]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: Fix attribute recover in rare recovery scenario
authorAlex Ainscow <aainscow@uk.ibm.com>
Wed, 11 Jun 2025 15:30:40 +0000 (16:30 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Sun, 7 Sep 2025 22:59:48 +0000 (23:59 +0100)
commita41402a0102a3aa59c2a136116e9fee83b17f1ef
treefb1d3bdc8d550dfed6ecaac9f6d46a9cf9e0cac5
parent1ca31ad06f31bfeafa326e58fcec58198aa51a0b
osd: Fix attribute recover in rare recovery scenario

When recovering attributes, we read them from the first potential primary, then
if that read failures, attempt to read from another potential primary.

The problem is that the code which calculates which shards to read for a recovery
only takes into account *data* and not where the attributes are.  As such, if the
second read only required a non-primary, then the attribute read fails and the
OSD panics.

The fix is to detect this scenario and perform an empty read to that shard, which
the attribute-read code can use for attribute reads.

Code was incorrectly interpreting a failed attribute read on recovery as
meaning a "fast_read". Also, no attribute recovery would occur in this case.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit 98eae78f7629295800cb7dbb252cac7d0feff680)
src/osd/ECCommon.cc
src/osd/ECCommon.h