diff options
author | Kevin Greenan <kmgreen2@gmail.com> | 2014-08-16 19:01:38 -0700 |
---|---|---|
committer | Kevin Greenan <kmgreen2@gmail.com> | 2014-08-20 09:15:36 -0700 |
commit | d251ed8f98abcbd90eb1f81a09da93d54427efd7 (patch) | |
tree | 1bd5dd2587669185ec7a61033c71c9d2779976e1 /src/erasurecode.c | |
parent | 2e4860ca50fe3525696e9c32d4b80fdc50654f96 (diff) | |
download | liberasurecode-d251ed8f98abcbd90eb1f81a09da93d54427efd7.tar.gz |
API change for liberasurecode_fragments_needed
Still needed:
1.) RS and XOR backends need to honor the 'exclude' argument.
2.) Need to add tests.
Diffstat (limited to 'src/erasurecode.c')
-rw-r--r-- | src/erasurecode.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/erasurecode.c b/src/erasurecode.c index 9b41293..fea3250 100644 --- a/src/erasurecode.c +++ b/src/erasurecode.c @@ -827,12 +827,18 @@ out: * * @desc: liberasurecode instance descriptor (obtained with * liberasurecode_instance_create) - * @missing_idx_list: list of indexes of missing elements + * @fragments_to_reconstruct list of indexes to reconstruct + * @fragments_to_exclude list of indexes to exclude from + reconstruction equation + * @fragments_needed list of fragments needed to reconstruct + fragments in fragments_to_reconstruct * * @return a list of lists (bitmaps) of indexes to rebuild data * from (in 'fragments_needed') */ -int liberasurecode_fragments_needed(int desc, int *missing_idxs, +int liberasurecode_fragments_needed(int desc, + int *fragments_to_reconstruct, + int *fragments_to_exclude, int *fragments_needed) { int ret = 0; @@ -845,10 +851,11 @@ int liberasurecode_fragments_needed(int desc, int *missing_idxs, /* FIXME preprocessing */ + /* FIXME use fragments_to_exclude */ + /* call the backend fragments_needed function passing it desc instance */ ret = instance->common.ops->fragments_needed( - instance->desc.backend_desc, missing_idxs, - fragments_needed); + instance->desc.backend_desc, fragments_to_reconstruct, fragments_needed); out_error: return ret; |