#include <stdio.h>
#include <stdlib.h>
#include "erasurecode.h"
#include "erasurecode_helpers.h"
#include "erasurecode_helpers_ext.h"
#include "erasurecode_backend.h"
Go to the source code of this file.
|
typedef int(* | shss_encode_func) (char **, size_t, int, int, int, int, long long *) |
|
typedef int(* | shss_decode_func) (char **, size_t, int *, int, int, int, int, int, long long *) |
|
typedef int(* | shss_reconstruct_func) (char **, size_t, int *, int, int *, int, int, int, int, int, long long *) |
|
|
static int | shss_encode (void *desc, char **data, char **parity, int blocksize) |
|
static int | shss_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize) |
|
static int | shss_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize) |
|
static int | shss_fragments_needed (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed) |
|
static int | shss_element_size (void *desc) |
| Return the element-size, which is the number of bits stored on a given device, per codeword. More...
|
|
static void * | shss_init (struct ec_backend_args *args, void *backend_sohandle) |
|
static int | shss_exit (void *desc) |
|
static bool | shss_is_compatible_with (uint32_t version) |
|
static size_t | shss_get_backend_metadata_size (void *desc, int blocksize) |
|
◆ DEFAULT_W
◆ METADATA
◆ SHSS_LIB_NAME
#define SHSS_LIB_NAME "shss" |
◆ SHSS_LIB_VER_STR
#define SHSS_LIB_VER_STR "1.0" |
◆ SHSS_SO_NAME
#define SHSS_SO_NAME "libshss.so.1" |
◆ shss_decode_func
typedef int(* shss_decode_func) (char **, size_t, int *, int, int, int, int, int, long long *) |
◆ shss_encode_func
typedef int(* shss_encode_func) (char **, size_t, int, int, int, int, long long *) |
◆ shss_reconstruct_func
typedef int(* shss_reconstruct_func) (char **, size_t, int *, int, int *, int, int, int, int, int, long long *) |
◆ shss_decode()
static int shss_decode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ shss_element_size()
static int shss_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 210 of file shss.c.
References DEFAULT_W.
◆ shss_encode()
static int shss_encode |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ shss_exit()
static int shss_exit |
( |
void * |
desc | ) |
|
|
static |
◆ shss_fragments_needed()
static int shss_fragments_needed |
( |
void * |
desc, |
|
|
int * |
missing_idxs, |
|
|
int * |
fragments_to_exclude, |
|
|
int * |
fragments_needed |
|
) |
| |
|
static |
◆ shss_get_backend_metadata_size()
static size_t shss_get_backend_metadata_size |
( |
void * |
desc, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ shss_init()
static void* shss_init |
( |
struct ec_backend_args * |
args, |
|
|
void * |
backend_sohandle |
|
) |
| |
|
static |
◆ shss_is_compatible_with()
static bool shss_is_compatible_with |
( |
uint32_t |
version | ) |
|
|
static |
◆ shss_reconstruct()
static int shss_reconstruct |
( |
void * |
desc, |
|
|
char ** |
data, |
|
|
char ** |
parity, |
|
|
int * |
missing_idxs, |
|
|
int |
destination_idx, |
|
|
int |
blocksize |
|
) |
| |
|
static |
◆ backend_shss
struct ec_backend_common backend_shss |
◆ shss
◆ shss_op_stubs
struct ec_backend_op_stubs shss_op_stubs |
Initial value:= {
.GETENCODEOFFSET = get_encode_offset_zero,
}
Definition at line 293 of file shss.c.
◆ shss_ops
struct ec_backend_op_stubs shss_ops |
static int shss_decode(void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
static int shss_element_size(void *desc)
Return the element-size, which is the number of bits stored on a given device, per codeword.
static int shss_reconstruct(void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)