From: Bill Scales Date: Fri, 29 Nov 2024 09:57:18 +0000 (+0000) Subject: osd: EC: Fix partial reads with LRC plugin X-Git-Tag: v20.0.0~288^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=701d8d0e0f0de2877c30cbf71a30411f4b33270e;p=ceph.git osd: EC: Fix partial reads with LRC plugin 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 --- diff --git a/src/osd/ECCommon.cc b/src/osd/ECCommon.cc index 9e981d54b79..70e1311eaa2 100644 --- a/src/osd/ECCommon.cc +++ b/src/osd/ECCommon.cc @@ -561,7 +561,8 @@ struct ClientReadCompleter : ECCommon::ReadCompleter { 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;