LRC plugin uses a mapping from raw_shard to shard, all other
EC plugins have an identity mapping. Partial reads need to
convert shard back to a raw_shard when calculating how to
trim the buffers that were read.
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
uint64_t chunk_size = read_pipeline.sinfo.get_chunk_size();
uint64_t trim_offset = 0;
for (auto shard : wanted_to_read) {
- if (shard * chunk_size < aligned_offset_in_stripe) {
+ if (read_pipeline.sinfo.get_raw_shard(shard) * chunk_size <
+ aligned_offset_in_stripe) {
trim_offset += chunk_size;
} else {
break;