Motr  M0
parity_math.h File Reference
#include "lib/vec.h"
#include "lib/bitmap.h"
#include "lib/tlist.h"
#include "matvec.h"
#include "ls_solve.h"
Include dependency graph for parity_math.h:

Go to the source code of this file.

Data Structures

struct  m0_sns_ir_block
 
struct  m0_reed_solomon
 
struct  m0_parity_math
 
struct  m0_sns_ir
 

Macros

#define __MOTR_SNS_PARITY_MATH_H__
 

Enumerations

enum  m0_parity_cal_algo { M0_PARITY_CAL_ALGO_XOR, M0_PARITY_CAL_ALGO_REED_SOLOMON, M0_PARITY_CAL_ALGO_NR }
 
enum  m0_sns_ir_block_status { M0_SI_BLOCK_ALIVE, M0_SI_BLOCK_FAILED }
 
enum  m0_sns_ir_block_type { M0_SI_BLOCK_LOCAL, M0_SI_BLOCK_REMOTE }
 
enum  m0_parity_linsys_algo { M0_LA_GAUSSIAN, M0_LA_INVERSE }
 

Functions

M0_INTERNAL int m0_parity_math_init (struct m0_parity_math *math, uint32_t data_count, uint32_t parity_count)
 
M0_INTERNAL void m0_parity_math_fini (struct m0_parity_math *math)
 
M0_INTERNAL void m0_parity_math_calculate (struct m0_parity_math *math, struct m0_buf *data, struct m0_buf *parity)
 
M0_INTERNAL int m0_parity_math_diff (struct m0_parity_math *math, struct m0_buf *old_ver, struct m0_buf *new_ver, struct m0_buf *parity, uint32_t index)
 
M0_INTERNAL void m0_parity_math_refine (struct m0_parity_math *math, struct m0_buf *data, struct m0_buf *parity, uint32_t data_ind_changed)
 
M0_INTERNAL int m0_parity_math_recover (struct m0_parity_math *math, struct m0_buf *data, struct m0_buf *parity, struct m0_buf *fails, enum m0_parity_linsys_algo algo)
 
M0_INTERNAL void m0_parity_math_fail_index_recover (struct m0_parity_math *math, struct m0_buf *data, struct m0_buf *parity, const uint32_t failure_index)
 
M0_INTERNAL void m0_parity_math_buffer_xor (struct m0_buf *dest, const struct m0_buf *src)
 
M0_INTERNAL int m0_sns_ir_failure_register (struct m0_bufvec *recov_addr, uint32_t failed_index, struct m0_sns_ir *ir)
 
M0_INTERNAL int m0_sns_ir_init (const struct m0_parity_math *math, uint32_t local_nr, struct m0_sns_ir *ir)
 
M0_INTERNAL int m0_sns_ir_mat_compute (struct m0_sns_ir *ir)
 
M0_INTERNAL int m0_sns_ir_recover (struct m0_sns_ir *ir, struct m0_bufvec *bufvec, const struct m0_bitmap *bitmap, uint32_t failed_index, enum m0_sns_ir_block_type block_type)
 
M0_INTERNAL void m0_sns_ir_fini (struct m0_sns_ir *ir)
 

Macro Definition Documentation

◆ __MOTR_SNS_PARITY_MATH_H__

#define __MOTR_SNS_PARITY_MATH_H__

Definition at line 25 of file parity_math.h.