Motr  M0
cksum_utils.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2021 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 #pragma once
23 
24 #ifndef __MOTR_CKSUM_UTILS_H__
25 #define __MOTR_CKSUM_UTILS_H__
26 
27 
32  m0_bindex_t ext_len,
33  m0_bindex_t unit_sz);
34 
39  m0_bindex_t base_off,
40  m0_bindex_t unit_sz);
41 
45 M0_INTERNAL void * m0_extent_get_checksum_addr(void *b_addr, m0_bindex_t off,
46  m0_bindex_t base_off,
47  m0_bindex_t unit_sz,
48  m0_bcount_t cs_size);
49 
54  m0_bindex_t ext_length,
55  m0_bindex_t unit_sz,
56  m0_bcount_t cs_size);
57 
58 M0_INTERNAL void * m0_extent_vec_get_checksum_addr(void *b_addr, m0_bindex_t off,
59  void *vec,
60  m0_bindex_t unit_sz,
61  m0_bcount_t cs_sz );
62 
63 #endif /* __MOTR_CKSUM_UTILS_H__ */
64 
65 /*
66  * Local variables:
67  * c-indentation-style: "K&R"
68  * c-basic-offset: 8
69  * tab-width: 8
70  * fill-column: 80
71  * scroll-step: 1
72  * End:
73  */
M0_INTERNAL void * m0_extent_vec_get_checksum_addr(void *b_addr, m0_bindex_t off, void *vec, m0_bindex_t unit_sz, m0_bcount_t cs_sz)
Definition: cksum_utils.c:107
uint64_t m0_bindex_t
Definition: types.h:80
M0_INTERNAL m0_bcount_t m0_extent_get_num_unit_start(m0_bindex_t ext_start, m0_bindex_t ext_len, m0_bindex_t unit_sz)
Definition: cksum_utils.c:29
uint64_t m0_bcount_t
Definition: types.h:77
M0_INTERNAL m0_bcount_t m0_extent_get_checksum_nob(m0_bindex_t ext_start, m0_bindex_t ext_length, m0_bindex_t unit_sz, m0_bcount_t cs_size)
Definition: cksum_utils.c:85
void * b_addr
Definition: buf.h:231
static void * vec
Definition: xcode.c:168
M0_INTERNAL void * m0_extent_get_checksum_addr(void *b_addr, m0_bindex_t off, m0_bindex_t base_off, m0_bindex_t unit_sz, m0_bcount_t cs_size)
Definition: cksum_utils.c:74
M0_INTERNAL m0_bcount_t m0_extent_get_unit_offset(m0_bindex_t off, m0_bindex_t base_off, m0_bindex_t unit_sz)
Definition: cksum_utils.c:65