Motr  M0
cksum_utils.c File Reference
#include "lib/buf.h"
#include "lib/vec.h"
#include "lib/ext.h"
#include "lib/trace.h"
#include "lib/cksum_utils.h"
Include dependency graph for cksum_utils.c:

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)
 

Function Documentation

◆ m0_extent_get_checksum_addr()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_extent_get_checksum_nob()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_extent_get_num_unit_start()

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.

Here is the caller graph for this function:

◆ m0_extent_get_unit_offset()

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.

Here is the caller graph for this function:

◆ m0_extent_vec_get_checksum_addr()

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.

Here is the call graph for this function:
Here is the caller graph for this function: