#include "dm-verity-fec.h"
#include <linux/math64.h>
#define DM_MSG_PREFIX …
bool verity_fec_is_enabled(struct dm_verity *v)
{ … }
static inline struct dm_verity_fec_io *fec_io(struct dm_verity_io *io)
{ … }
static inline u64 fec_interleave(struct dm_verity *v, u64 offset)
{ … }
static int fec_decode_rs8(struct dm_verity *v, struct dm_verity_fec_io *fio,
u8 *data, u8 *fec, int neras)
{ … }
static u8 *fec_read_parity(struct dm_verity *v, u64 rsb, int index,
unsigned int *offset, struct dm_buffer **buf,
unsigned short ioprio)
{ … }
#define fec_for_each_prealloc_buffer(__i) …
#define fec_for_each_extra_buffer(io, __i) …
#define fec_for_each_buffer(io, __i) …
#define fec_for_each_buffer_rs_block(io, __i, __j) …
static inline u8 *fec_buffer_rs_block(struct dm_verity *v,
struct dm_verity_fec_io *fio,
unsigned int i, unsigned int j)
{ … }
static inline unsigned int fec_buffer_rs_index(unsigned int i, unsigned int j)
{ … }
static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_io *io,
struct dm_verity_fec_io *fio, u64 rsb, int byte_index,
unsigned int block_offset, int neras)
{ … }
static int fec_is_erasure(struct dm_verity *v, struct dm_verity_io *io,
u8 *want_digest, u8 *data)
{ … }
static int fec_read_bufs(struct dm_verity *v, struct dm_verity_io *io,
u64 rsb, u64 target, unsigned int block_offset,
int *neras)
{ … }
static int fec_alloc_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio)
{ … }
static void fec_init_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio)
{ … }
static int fec_decode_rsb(struct dm_verity *v, struct dm_verity_io *io,
struct dm_verity_fec_io *fio, u64 rsb, u64 offset,
bool use_erasures)
{ … }
int verity_fec_decode(struct dm_verity *v, struct dm_verity_io *io,
enum verity_block_type type, sector_t block, u8 *dest)
{ … }
void verity_fec_finish_io(struct dm_verity_io *io)
{ … }
void verity_fec_init_io(struct dm_verity_io *io)
{ … }
unsigned int verity_fec_status_table(struct dm_verity *v, unsigned int sz,
char *result, unsigned int maxlen)
{ … }
void verity_fec_dtr(struct dm_verity *v)
{ … }
static void *fec_rs_alloc(gfp_t gfp_mask, void *pool_data)
{ … }
static void fec_rs_free(void *element, void *pool_data)
{ … }
bool verity_is_fec_opt_arg(const char *arg_name)
{ … }
int verity_fec_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v,
unsigned int *argc, const char *arg_name)
{ … }
int verity_fec_ctr_alloc(struct dm_verity *v)
{ … }
int verity_fec_ctr(struct dm_verity *v)
{ … }