#include <stdio.h>
#include <stdlib.h>
#include "erasurecode.h"
#include "erasurecode_backend.h"
Go to the source code of this file.
|
typedef void *(* | init_null_code_func) (int, int, int) |
|
typedef int(* | null_code_encode_func) (void *, char **, char **, int) |
|
typedef int(* | null_code_decode_func) (void *, char **, char **, int *, int, int) |
|
typedef int(* | null_reconstruct_func) (char **, int, uint64_t, int, char *) |
|
typedef int(* | null_code_fragments_needed_func) (void *, int *, int *, int *) |
|
|
static int | null_encode (void *desc, char **data, char **parity, int blocksize) |
|
static int | null_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize) |
|
static int | null_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize) |
|
static int | null_min_fragments (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed) |
|
static int | null_element_size (void *desc) |
| Return the element-size, which is the number of bits stored on a given device, per codeword.
|
|
static void * | null_init (struct ec_backend_args *args, void *backend_sohandle) |
|
static int | null_exit (void *desc) |
|
static bool | null_is_compatible_with (uint32_t version) |
|
◆ DEFAULT_W
◆ NULL_LIB_MAJOR
◆ NULL_LIB_MINOR
◆ NULL_LIB_NAME
#define NULL_LIB_NAME "null" |
◆ NULL_LIB_REV
◆ NULL_LIB_VER_STR
#define NULL_LIB_VER_STR "1.0" |
◆ NULL_SO_NAME
#define NULL_SO_NAME "libnullcode" LIBERASURECODE_SO_SUFFIX ".so.1" |
◆ init_null_code_func
typedef void *(* init_null_code_func) (int, int, int) |
◆ null_code_decode_func
typedef int(* null_code_decode_func) (void *, char **, char **, int *, int, int) |
◆ null_code_encode_func
typedef int(* null_code_encode_func) (void *, char **, char **, int) |
◆ null_code_fragments_needed_func
typedef int(* null_code_fragments_needed_func) (void *, int *, int *, int *) |
◆ null_reconstruct_func
typedef int(* null_reconstruct_func) (char **, int, uint64_t, int, char *) |
◆ null_decode()
static int null_decode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ null_element_size()
static int null_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 107 of file null.c.
References DEFAULT_W.
◆ null_encode()
static int null_encode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ null_exit()
static int null_exit |
( |
void * |
desc | ) |
|
|
static |
◆ null_init()
static void * null_init |
( |
struct ec_backend_args * |
args, |
|
|
void * |
backend_sohandle |
|
) |
| |
|
static |
◆ null_is_compatible_with()
static bool null_is_compatible_with |
( |
uint32_t |
version | ) |
|
|
static |
◆ null_min_fragments()
static int null_min_fragments |
( |
void * |
desc, |
|
|
int * |
missing_idxs, |
|
|
int * |
fragments_to_exclude, |
|
|
int * |
fragments_needed |
|
) |
| |
|
static |
◆ null_reconstruct()
static int null_reconstruct |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
destination_idx, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ backend_null
struct ec_backend_common backend_null |
Initial value:= {
.id = EC_BACKEND_NULL,
}
struct ec_backend_op_stubs null_op_stubs
Definition at line 231 of file null.c.
◆ null
◆ null_op_stubs
struct ec_backend_op_stubs null_op_stubs |
Initial value:= {
.GETMETADATASIZE = get_backend_metadata_size_zero,
.GETENCODEOFFSET = get_encode_offset_zero,
}
static bool null_is_compatible_with(uint32_t version)
static int null_reconstruct(void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)
static int null_element_size(void *desc)
Return the element-size, which is the number of bits stored on a given device, per codeword.
static int null_decode(void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
static void * null_init(struct ec_backend_args *args, void *backend_sohandle)
static int null_exit(void *desc)
static int null_min_fragments(void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)
static int null_encode(void *desc, char **data, char **parity, int blocksize)
Definition at line 218 of file null.c.
◆ null_ops
struct ec_backend_op_stubs null_ops |