From e2af5a8266f4a639ac8b4f165a3f00fa429097dc Mon Sep 17 00:00:00 2001 From: Alex Ainscow Date: Fri, 28 Nov 2025 14:33:13 +0000 Subject: [PATCH] osd: Perform shard look up correctly in partial EC writes 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 --- src/osd/ECTransaction.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/ECTransaction.cc b/src/osd/ECTransaction.cc index b0c49f62b445..ba64e9b388de 100644 --- a/src/osd/ECTransaction.cc +++ b/src/osd/ECTransaction.cc @@ -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(); -- 2.47.3