]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: EC: Fix partial reads with LRC plugin 59480/head
authorBill Scales <bill_scales@uk.ibm.com>
Fri, 29 Nov 2024 09:57:18 +0000 (09:57 +0000)
committerBill Scales <bill_scales@uk.ibm.com>
Fri, 29 Nov 2024 20:43:42 +0000 (20:43 +0000)
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>
src/osd/ECCommon.cc

index 9e981d54b7962a1fed2409413dc2ec9d86e976b8..70e1311eaa2e5e9b4d6c71495ca599152ec05c2d 100644 (file)
@@ -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;