diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/erasurecode/erasurecode.h | 2 | ||||
-rw-r--r-- | include/erasurecode/erasurecode_helpers.h | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/erasurecode/erasurecode.h b/include/erasurecode/erasurecode.h index 78fe98d..a8b1e43 100644 --- a/include/erasurecode/erasurecode.h +++ b/include/erasurecode/erasurecode.h @@ -248,6 +248,8 @@ fragment_metadata uint8_t chksum_type; /* 1 */ uint32_t chksum[LIBERASURECODE_MAX_CHECKSUM_LEN]; /* 32 */ uint8_t chksum_mismatch; /* 1 */ + uint8_t backend_id; /* 1 */ + uint32_t backend_version; /* 4 */ } fragment_metadata_t; #define FRAGSIZE_2_BLOCKSIZE(fragment_size) \ diff --git a/include/erasurecode/erasurecode_helpers.h b/include/erasurecode/erasurecode_helpers.h index e8fddaa..0e53e63 100644 --- a/include/erasurecode/erasurecode_helpers.h +++ b/include/erasurecode/erasurecode_helpers.h @@ -45,11 +45,12 @@ typedef struct __attribute__((__packed__)) fragment_header_s { - fragment_metadata_t meta; /* 50 bytes */ + fragment_metadata_t meta; /* 55 bytes */ uint32_t magic; /* 4 bytes */ + uint32_t libec_version; /* 4 bytes */ // We must be aligned to 16-byte boundaries // So, size this array accordingly - uint8_t aligned_padding[10]; + uint8_t aligned_padding[1]; } fragment_header_t; /* ==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~== */ @@ -137,6 +138,8 @@ int get_orig_data_size(char *buf); int validate_fragment(char *buf); int set_checksum(ec_checksum_type_t ct, char *buf, int blocksize); int get_checksum(char *buf); +int set_libec_version(char *fragment); +int get_libec_version(char *fragment, uint32_t *ver); /* ==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~==~=*=~== */ |