]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: get_primary_shard should not call pgtemp_undo_primaryfirst 69000/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Tue, 19 May 2026 16:38:35 +0000 (17:38 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Wed, 3 Jun 2026 16:05:26 +0000 (17:05 +0100)
In this variant of get_primary_shard, the function attempts to undo
the primaryfirst ordering.  This is incorrect, because pg_to_acting_osds
has already applied this.

The fix is simply to remove this code.

This is unlikely to be a significant problem, as this function is not
used in the critical locations.  We are building new test harnesses
which will rely on this behaviour.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osd/OSDMap.h

index bbed6cf70abd9755ca3225d0a3f1f4403fa1933f..1de0a2dccd29c40298eb3c502bff1e59bb15f0b3 100644 (file)
@@ -1355,7 +1355,7 @@ public:
     if (poolit->second.is_erasure()) {
       for (uint8_t i = 0; i < acting.size(); ++i) {
        if (acting[i] == *primary) {
-         *out = spg_t(pgid, pgtemp_undo_primaryfirst(poolit->second, pgid, shard_id_t(i)));
+         *out = spg_t(pgid, shard_id_t(i));
          return true;
        }
       }