#include <stdio.h>
#include <stdlib.h>
#include <xor_code.h>
#include "erasurecode.h"
#include "erasurecode_backend.h"
Go to the source code of this file.
|
typedef xor_code_t *(* | init_xor_hd_code_func) (int, int, int) |
|
typedef void(* | xor_code_encode_func) (xor_code_t *, char **, char **, int) |
|
typedef int(* | xor_code_decode_func) (xor_code_t *, char **, char **, int *, int, int) |
|
typedef int(* | xor_hd_fragments_needed_func) (xor_code_t *, int *, int *, int *) |
|
|
static int | flat_xor_hd_encode (void *desc, char **data, char **parity, int blocksize) |
|
static int | flat_xor_hd_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize) |
|
static int | flat_xor_hd_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize) |
|
static int | flat_xor_hd_min_fragments (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed) |
|
static int | flar_xor_hd_element_size (void *desc) |
| Return the element-size, which is the number of bits stored on a given device, per codeword. More...
|
|
static void * | flat_xor_hd_init (struct ec_backend_args *args, void *sohandle) |
|
static int | flat_xor_hd_exit (void *desc) |
|
static bool | flat_xor_is_compatible_with (uint32_t version) |
|
◆ DEFAULT_W
◆ FLAT_XOR_LIB_MAJOR
#define FLAT_XOR_LIB_MAJOR 1 |
◆ FLAT_XOR_LIB_MINOR
#define FLAT_XOR_LIB_MINOR 0 |
◆ FLAT_XOR_LIB_NAME
#define FLAT_XOR_LIB_NAME "flat_xor_hd" |
◆ FLAT_XOR_LIB_REV
#define FLAT_XOR_LIB_REV 0 |
◆ FLAT_XOR_LIB_VER_STR
#define FLAT_XOR_LIB_VER_STR "1.0" |
◆ FLAT_XOR_SO_NAME
#define FLAT_XOR_SO_NAME "libXorcode.so.1" |
◆ init_xor_hd_code_func
typedef xor_code_t*(* init_xor_hd_code_func) (int, int, int) |
◆ xor_code_decode_func
typedef int(* xor_code_decode_func) (xor_code_t *, char **, char **, int *, int, int) |
◆ xor_code_encode_func
typedef void(* xor_code_encode_func) (xor_code_t *, char **, char **, int) |
◆ xor_hd_fragments_needed_func
typedef int(* xor_hd_fragments_needed_func) (xor_code_t *, int *, int *, int *) |
◆ flar_xor_hd_element_size()
static int flar_xor_hd_element_size |
( |
void * |
desc | ) |
|
|
static |
Return the element-size, which is the number of bits stored on a given device, per codeword.
This is usually just 'w'.
Definition at line 118 of file flat_xor_hd.c.
References DEFAULT_W.
◆ flat_xor_hd_decode()
static int flat_xor_hd_decode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ flat_xor_hd_encode()
static int flat_xor_hd_encode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ flat_xor_hd_exit()
static int flat_xor_hd_exit |
( |
void * |
desc | ) |
|
|
static |
◆ flat_xor_hd_init()
static void* flat_xor_hd_init |
( |
struct ec_backend_args * |
args, |
|
|
void * |
sohandle |
|
) |
| |
|
static |
◆ flat_xor_hd_min_fragments()
static int flat_xor_hd_min_fragments |
( |
void * |
desc, |
|
|
int * |
missing_idxs, |
|
|
int * |
fragments_to_exclude, |
|
|
int * |
fragments_needed |
|
) |
| |
|
static |
◆ flat_xor_hd_reconstruct()
static int flat_xor_hd_reconstruct |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
destination_idx, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ flat_xor_is_compatible_with()
static bool flat_xor_is_compatible_with |
( |
uint32_t |
version | ) |
|
|
static |
◆ backend_flat_xor_hd
struct ec_backend_common backend_flat_xor_hd |
Initial value:= {
.id = EC_BACKEND_FLAT_XOR_HD,
}
#define FLAT_XOR_LIB_MINOR
struct ec_backend_op_stubs flat_xor_hd_op_stubs
#define FLAT_XOR_LIB_NAME
#define FLAT_XOR_LIB_MAJOR
#define FLAT_XOR_LIB_VER_STR
Definition at line 1 of file flat_xor_hd.c.
◆ flat_xor_hd
struct ec_backend flat_xor_hd |
◆ flat_xor_hd_op_stubs
struct ec_backend_op_stubs flat_xor_hd_op_stubs |
Initial value:= {
.GETMETADATASIZE = get_backend_metadata_size_zero,
.GETENCODEOFFSET = get_encode_offset_zero,
}
static int flat_xor_hd_exit(void *desc)
static void * flat_xor_hd_init(struct ec_backend_args *args, void *sohandle)
static int flat_xor_hd_reconstruct(void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)
static bool flat_xor_is_compatible_with(uint32_t version)
static int flar_xor_hd_element_size(void *desc)
Return the element-size, which is the number of bits stored on a given device, per codeword.
static int flat_xor_hd_decode(void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
static int flat_xor_hd_min_fragments(void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)
static int flat_xor_hd_encode(void *desc, char **data, char **parity, int blocksize)
Definition at line 168 of file flat_xor_hd.c.
◆ flat_xor_hd_ops
struct ec_backend_op_stubs flat_xor_hd_ops |