summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Lambert <eric_lambert@xyratex.com>2014-09-10 17:13:45 -0700
committerEric Lambert <eric_lambert@xyratex.com>2014-09-10 17:13:45 -0700
commit512353f8be456f9f8045faafbdb3356a4dbdb8ad (patch)
tree7081b07e838b6def308551c237411c1101fd0925 /include
parentcafa07b224255874a80b776fa5574971fbaabca3 (diff)
downloadliberasurecode-512353f8be456f9f8045faafbdb3356a4dbdb8ad.tar.gz
Compile in pedantic mode and fail compilation on warnings. Also cleanup all existing warnings.
Diffstat (limited to 'include')
-rw-r--r--include/erasurecode/alg_sig.h4
-rw-r--r--include/erasurecode/erasurecode.h21
-rw-r--r--include/erasurecode/erasurecode_helpers.h2
-rw-r--r--include/erasurecode/erasurecode_postprocessing.h6
-rw-r--r--include/xor_codes/xor_code.h4
5 files changed, 11 insertions, 26 deletions
diff --git a/include/erasurecode/alg_sig.h b/include/erasurecode/alg_sig.h
index eba9ed4..9c97ec0 100644
--- a/include/erasurecode/alg_sig.h
+++ b/include/erasurecode/alg_sig.h
@@ -25,8 +25,10 @@
#ifndef _ALG_SIG_H
#define _ALG_SIG_H
+typedef int (*galois_single_multiply_func)(int, int, int);
+
struct jerasure_mult_routines {
- int (*galois_single_multiply)(int, int, int);
+ galois_single_multiply_func galois_single_multiply;
};
#define JERASURE_SONAME "libJerasure.dylib"
diff --git a/include/erasurecode/erasurecode.h b/include/erasurecode/erasurecode.h
index 97a2c65..c63c7dd 100644
--- a/include/erasurecode/erasurecode.h
+++ b/include/erasurecode/erasurecode.h
@@ -47,17 +47,6 @@ typedef enum {
EC_BACKENDS_MAX,
} ec_backend_id_t;
-#ifndef EC_BACKENDS_SUPPORTED
-#define EC_BACKENDS_SUPPORTED
-/* Supported EC backends */
-static const char *ec_backend_names[EC_BACKENDS_MAX] = {
- "null",
- "jerasure_rs_vand",
- "jerasure_rs_cauchy",
- "flat_xor_hd",
-};
-#endif // EC_BACKENDS_SUPPORTED
-
/* ~=*=~==~=*=~= EC Fragment metadata - supported checksum types ~=*=~==~=*=~ */
/* Checksum types supported for fragment metadata stored in each fragment */
@@ -68,16 +57,6 @@ typedef enum {
CHKSUM_TYPES_MAX,
} ec_checksum_type_t;
-#ifndef EC_CHKSUM_TYPES_SUPPORTED
-#define EC_CHKSUM_TYPES_SUPPORTED
-/* Supported EC backends */
-static const char *ec_chksum_types[CHKSUM_TYPES_MAX] = {
- "none",
- "crc32",
- "md5",
-};
-#endif // EC_CHKSUM_TYPES_SUPPORTED
-
/* =~=*=~==~=*=~== EC Arguments - Common and backend-specific =~=*=~==~=*=~== */
/**
diff --git a/include/erasurecode/erasurecode_helpers.h b/include/erasurecode/erasurecode_helpers.h
index 428460f..60d871f 100644
--- a/include/erasurecode/erasurecode_helpers.h
+++ b/include/erasurecode/erasurecode_helpers.h
@@ -135,7 +135,7 @@ int get_fragment_payload_size(char *buf);
int set_orig_data_size(char *buf, int orig_data_size);
int get_orig_data_size(char *buf);
int validate_fragment(char *buf);
-int set_checksum(char *buf, int chksum);
+int set_checksum(char *buf, int blocksize);
int get_checksum(char *buf);
/* ==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~== */
diff --git a/include/erasurecode/erasurecode_postprocessing.h b/include/erasurecode/erasurecode_postprocessing.h
index b6c7b2f..e57ccca 100644
--- a/include/erasurecode/erasurecode_postprocessing.h
+++ b/include/erasurecode/erasurecode_postprocessing.h
@@ -30,7 +30,11 @@
#define _ERASURECODE_POSTPROCESSING_H_
int finalize_fragments_after_encode(ec_backend_t instance,
- int k, int m, int blocksize,
+ int k, int m, int blocksize, uint64_t orig_data_size,
char **encoded_data, char **encoded_parity);
+void add_fragment_metadata(char *fragment,
+ int idx, uint64_t orig_data_size, int blocksize,
+ int add_chksum);
+
#endif
diff --git a/include/xor_codes/xor_code.h b/include/xor_codes/xor_code.h
index 8a4a528..7eaf39a 100644
--- a/include/xor_codes/xor_code.h
+++ b/include/xor_codes/xor_code.h
@@ -54,8 +54,8 @@ typedef struct xor_code_s
int k;
int m;
int hd;
- int *parity_bms;
- int *data_bms;
+ unsigned int *parity_bms;
+ unsigned int *data_bms;
int (*decode)(struct xor_code_s *code_desc, char **data, char **parity, int *missing_idxs, int blocksize, int decode_parity);
void (*encode)(struct xor_code_s *code_desc, char **data, char **parity, int blocksize);
int (*fragments_needed)(struct xor_code_s *code_desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed);