summaryrefslogtreecommitdiff
path: root/src/erasurecode.c
diff options
context:
space:
mode:
authorKota Tsuyuzaki <bloodeagle40234@gmail.com>2015-01-05 03:06:47 -0800
committerKota Tsuyuzaki <bloodeagle40234@gmail.com>2015-02-27 15:44:37 +0900
commit72746d1c51cabfa0dcc101d98192c7a8262844ad (patch)
tree216edd00f9841b733216feab64e61d9a10ddd81f /src/erasurecode.c
parent57f5c565e64f8c33d3e299a8542de6d0f083b840 (diff)
downloadliberasurecode-72746d1c51cabfa0dcc101d98192c7a8262844ad.tar.gz
Move backend metadata adding to fragment allocation
On the first consideration[1], metadata_adder is defined as a extra byte size for "each" fragment. However, current implementation is an element affects to data_len. (i.e. aligned_data_size for original segment data) We should make metadata_adder to be a fixed value against to each fragment, otherwise the extra bytes for the fragments will have flexible length depends on "K". It will be quite complex for backend implementation to know "How large bytes the raw data size is", "How large bytes the backend could use as extra bytes for each fragment". 1: https://bitbucket.org/tsg-/liberasurecode/commits/032b57d9b1c7aadc547fccbacf88af786c9067e7?at=master
Diffstat (limited to 'src/erasurecode.c')
-rw-r--r--src/erasurecode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/erasurecode.c b/src/erasurecode.c
index 775f37c..5bba185 100644
--- a/src/erasurecode.c
+++ b/src/erasurecode.c
@@ -631,8 +631,8 @@ int liberasurecode_decode(int desc,
* (realloc_bm).
*
*/
- ret = prepare_fragments_for_decode(k, m,
- data, parity, missing_idxs,
+ ret = prepare_fragments_for_decode(instance, k, m,
+ data, parity, missing_idxs,
&orig_data_size, &blocksize,
fragment_len, &realloc_bm);
if (ret < 0) {
@@ -799,7 +799,7 @@ int liberasurecode_reconstruct_fragment(int desc,
* It passes back a bitmap telling us which buffers need to be freed by
* us (realloc_bm).
*/
- ret = prepare_fragments_for_decode(k, m, data, parity, missing_idxs,
+ ret = prepare_fragments_for_decode(instance, k, m, data, parity, missing_idxs,
&orig_data_size, &blocksize,
fragment_len, &realloc_bm);
if (ret < 0) {