#include <stdio.h>
#include <stdlib.h>
#include "erasurecode.h"
#include "erasurecode_backend.h"
#include "erasurecode_helpers.h"
Go to the source code of this file.
|
typedef int(* | pio_matrix_encode_func) (char *, char *, char **, int, int, int, int, int, int) |
|
typedef int(* | pio_matrix_decode_func) (char *, char *, char **, int *, int, int, int, int, int, int) |
|
typedef int(* | pio_matrix_reconstruct_func) (char *, char **, int *, int, int, int, int, int, int) |
|
typedef char *(* | pio_create_precoding_matrix_func) (int) |
|
typedef char *(* | pio_create_inverse_precoding_matrix_func) (int) |
|
typedef char *(* | pio_create_kmux_matrix_func) (int, int, int) |
|
|
static int | get_padded_blocksize (int w, int hd, int blocksize) |
|
static int | pio_matrix_encode (void *desc, char **data, char **parity, int blocksize) |
|
static int | pio_matrix_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize) |
|
static int | pio_matrix_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize) |
|
static int | pio_min_fragments (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed) |
|
static int | pio_element_size (void *desc) |
| Return the element-size, which is the number of bits stored on a given device, per codeword. More...
|
|
static void * | pio_init (struct ec_backend_args *args, void *backend_sohandle) |
|
static int | pio_exit (void *desc) |
|
static bool | pio_is_compatible_with (uint32_t version) |
|
static size_t | pio_get_backend_metadata_size (void *desc, int blocksize) |
|
static size_t | pio_get_encode_offset (void *desc, int metadata_size) |
|
◆ DEFAULT_HD
◆ DEFAULT_W
◆ LIBPHAZR_LIB_MAJOR
#define LIBPHAZR_LIB_MAJOR 1 |
◆ LIBPHAZR_LIB_MINOR
#define LIBPHAZR_LIB_MINOR 0 |
◆ LIBPHAZR_LIB_NAME
#define LIBPHAZR_LIB_NAME "libphazr" |
◆ LIBPHAZR_LIB_REV
#define LIBPHAZR_LIB_REV 0 |
◆ LIBPHAZR_LIB_VER_STR
#define LIBPHAZR_LIB_VER_STR "1.0.0" |
◆ LIBPHAZR_SO_NAME
#define LIBPHAZR_SO_NAME "libphazr.so.1" |
◆ pio_create_inverse_precoding_matrix_func
typedef char*(* pio_create_inverse_precoding_matrix_func) (int) |
◆ pio_create_kmux_matrix_func
typedef char*(* pio_create_kmux_matrix_func) (int, int, int) |
◆ pio_create_precoding_matrix_func
typedef char*(* pio_create_precoding_matrix_func) (int) |
◆ pio_matrix_decode_func
typedef int(* pio_matrix_decode_func) (char *, char *, char **, int *, int, int, int, int, int, int) |
◆ pio_matrix_encode_func
typedef int(* pio_matrix_encode_func) (char *, char *, char **, int, int, int, int, int, int) |
◆ pio_matrix_reconstruct_func
typedef int(* pio_matrix_reconstruct_func) (char *, char **, int *, int, int, int, int, int, int) |
◆ get_padded_blocksize()
static int get_padded_blocksize |
( |
int |
w, |
|
|
int |
hd, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ pio_element_size()
static int pio_element_size |
( |
void * |
desc | ) |
|
|
static |
◆ pio_exit()
static int pio_exit |
( |
void * |
desc | ) |
|
|
static |
◆ pio_get_backend_metadata_size()
static size_t pio_get_backend_metadata_size |
( |
void * |
desc, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ pio_get_encode_offset()
static size_t pio_get_encode_offset |
( |
void * |
desc, |
|
|
int |
metadata_size |
|
) |
| |
|
static |
◆ pio_init()
static void* pio_init |
( |
struct ec_backend_args * |
args, |
|
|
void * |
backend_sohandle |
|
) |
| |
|
static |
Definition at line 219 of file libphazr.c.
References libphazr_descriptor::create_inverse_precoding_matrix, libphazr_descriptor::create_kmux_matrix, libphazr_descriptor::create_precoding_matrix, DEFAULT_HD, DEFAULT_W, libphazr_descriptor::hd, libphazr_descriptor::inverse_precoding_matrix, libphazr_descriptor::k, libphazr_descriptor::m, libphazr_descriptor::matrix, libphazr_descriptor::matrix_decode, libphazr_descriptor::matrix_encode, libphazr_descriptor::matrix_reconstruct, libphazr_descriptor::precoding_matrix, and libphazr_descriptor::w.
◆ pio_is_compatible_with()
static bool pio_is_compatible_with |
( |
uint32_t |
version | ) |
|
|
static |
◆ pio_matrix_decode()
static int pio_matrix_decode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ pio_matrix_encode()
static int pio_matrix_encode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ pio_matrix_reconstruct()
static int pio_matrix_reconstruct |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
destination_idx, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ pio_min_fragments()
static int pio_min_fragments |
( |
void * |
desc, |
|
|
int * |
missing_idxs, |
|
|
int * |
fragments_to_exclude, |
|
|
int * |
fragments_needed |
|
) |
| |
|
static |
◆ backend_libphazr
struct ec_backend_common backend_libphazr |
Initial value:= {
.id = EC_BACKEND_LIBPHAZR,
}
#define LIBPHAZR_LIB_VER_STR
#define LIBPHAZR_LIB_NAME
#define LIBPHAZR_LIB_MINOR
#define LIBPHAZR_LIB_MAJOR
struct ec_backend_op_stubs libphazr_op_stubs
Definition at line 1 of file libphazr.c.
Referenced by pio_is_compatible_with().
◆ libphazr
struct ec_backend libphazr |
◆ libphazr_op_stubs
struct ec_backend_op_stubs libphazr_op_stubs |
Initial value:= {
}
static int pio_matrix_decode(void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
static int pio_matrix_reconstruct(void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)
static int pio_element_size(void *desc)
Return the element-size, which is the number of bits stored on a given device, per codeword.
static int pio_matrix_encode(void *desc, char **data, char **parity, int blocksize)
static int pio_min_fragments(void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)
static bool pio_is_compatible_with(uint32_t version)
static size_t pio_get_backend_metadata_size(void *desc, int blocksize)
static size_t pio_get_encode_offset(void *desc, int metadata_size)
static int pio_exit(void *desc)
static void * pio_init(struct ec_backend_args *args, void *backend_sohandle)
Definition at line 363 of file libphazr.c.
◆ libphazr_ops
struct ec_backend_op_stubs libphazr_ops |