Motr
M0
|
#include "lib/buf.h"
#include "lib/vec.h"
#include "lib/ext.h"
#include "lib/trace.h"
#include "lib/cksum_utils.h"
Go to the source code of this file.
Functions | |
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) |
M0_INTERNAL m0_bcount_t | m0_extent_get_unit_offset (m0_bindex_t off, m0_bindex_t base_off, m0_bindex_t unit_sz) |
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) |
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) |
M0_INTERNAL void * | m0_extent_vec_get_checksum_addr (void *cksum_buf_vec, m0_bindex_t off, void *ivec, m0_bindex_t unit_sz, m0_bcount_t cs_sz) |
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 | ||
) |
Calculates checksum address for a cob segment and unit size
Definition at line 74 of file cksum_utils.c.
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 | ||
) |
Calculates checksum nob for a cob segment and unit size
Definition at line 85 of file cksum_utils.c.
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 | ||
) |
Function to get number of units starting in a given extent range.
Add handling for case 1 and 5
Definition at line 29 of file cksum_utils.c.
M0_INTERNAL m0_bcount_t m0_extent_get_unit_offset | ( | m0_bindex_t | off, |
m0_bindex_t | base_off, | ||
m0_bindex_t | unit_sz | ||
) |
Function returns offset for a given unit size
Definition at line 65 of file cksum_utils.c.
M0_INTERNAL void* m0_extent_vec_get_checksum_addr | ( | void * | cksum_buf_vec, |
m0_bindex_t | off, | ||
void * | ivec, | ||
m0_bindex_t | unit_sz, | ||
m0_bcount_t | cs_sz | ||
) |
Assert to make sure the the offset is lying within the extent
get the checksum_addr
Definition at line 107 of file cksum_utils.c.