Motr  M0
m0_di_ops Struct Reference

#include <di.h>

Collaboration diagram for m0_di_ops:
Collaboration graph

Data Fields

const struct m0_di_typedo_type
 
uint64_t(* do_mask )(const struct m0_file *file)
 
uint64_t(* do_in_shift )(const struct m0_file *file)
 
uint64_t(* do_out_shift )(const struct m0_file *file)
 
void(* do_sum )(const struct m0_file *file, const struct m0_indexvec *io_info, const struct m0_bufvec *in, struct m0_bufvec *out)
 
bool(* do_check )(const struct m0_file *file, const struct m0_indexvec *io_info, const struct m0_bufvec *in, const struct m0_bufvec *out)
 

Detailed Description

Definition at line 92 of file di.h.

Field Documentation

◆ do_check

bool(* do_check) (const struct m0_file *file, const struct m0_indexvec *io_info, const struct m0_bufvec *in, const struct m0_bufvec *out)

Check that di data in output bufvec match the input bufvec.

Parameters
io_infocontains offsets and sizes of data, used to compute tag values and compare with values in di data.

Definition at line 131 of file di.h.

◆ do_in_shift

uint64_t(* do_in_shift) (const struct m0_file *file)

Shift (binary logarithm) of input block size.

If this is ~0ULL, the algorithm applies to an entire file.

Definition at line 104 of file di.h.

◆ do_mask

uint64_t(* do_mask) (const struct m0_file *file)

Returns the mask of block attributes (stob/battr.h), used by this di type.

Definition at line 98 of file di.h.

◆ do_out_shift

uint64_t(* do_out_shift) (const struct m0_file *file)

Shift of output block size, that is, of number of bytes of di data (e.g., checksum) produced by this di type for each input block.

Definition at line 109 of file di.h.

◆ do_sum

void(* do_sum) (const struct m0_file *file, const struct m0_indexvec *io_info, const struct m0_bufvec *in, struct m0_bufvec *out)

Calculate di data for the input bufvec (which is not necessarily a multiple of input block size) and place the result in the appropriately sized output bufvec.

Some parts of the output bufvec can be already filled by the caller, they should not be overwritten. For example, the application already calculated the t10-dif checksum, Motr only computes Reference and Application Tags.

Parameters
io_infocontains offsets and sizes of data, used to compute tag values.

Definition at line 122 of file di.h.

◆ do_type

const struct m0_di_type* do_type

Definition at line 93 of file di.h.


The documentation for this struct was generated from the following file: