]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Perform shard look up correctly in partial EC writes 66453/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Fri, 28 Nov 2025 14:33:13 +0000 (14:33 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Fri, 28 Nov 2025 14:35:03 +0000 (14:35 +0000)
Plugins are permitted to provide a mapping to change the order in which OSDs
are used. In practice only LRC does this and it is not currently enabled
with optimisations, so this is a theoretical bug.

The bug here was that the "first" shard was assumed to be shard_id_t(0).  However,
this is not true for LRC.

Fixes: https://tracker.ceph.com/issues/74016
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osd/ECTransaction.cc

index b0c49f62b445f59663864ea9f5465109a59c8572..ba64e9b388dedc5d615ea217dcfdf9841128be3f 100644 (file)
@@ -590,7 +590,7 @@ ECTransaction::Generate::Generate(PGTransaction &t,
   } else {
     // All primary shards must always be written, regardless of the write plan.
     shards_written(sinfo.get_parity_shards());
-    shard_written(shard_id_t(0));
+    shard_written(sinfo.get_shard(raw_shard_id_t(0)));
   }
 
   written_shards();