]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: ensure async recovery does not drop a pg below min_size 54548/head
authorSamuel Just <sjust@redhat.com>
Fri, 4 Aug 2023 23:12:34 +0000 (16:12 -0700)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Fri, 24 Nov 2023 06:03:36 +0000 (13:03 +0700)
commitbca977cc7e2767a641c12e42103a7cd19a118fcc
tree644323ad941a58c5e62a19e0c3418c8980cb592a
parent1cb83a8f98c921211679daae2d45cba4f0632ae7
osd: ensure async recovery does not drop a pg below min_size

PeeringState::choose_async_recovery_ec may remove OSDs from the acting
set as long as PeeringState::recoverable evaluates to true. Prior to
90022b35 (merge of PR 17619), the condition was
PeeringState::recoverable_and_ge_min_size, which behaved as the name
indicates. 7cb818a85 weakened the condition in
PeeringState::recoverable_and_ge_min_size to only check min_size if
!cct->_conf.get_val<bool>("osd_allow_recovery_below_min_size") (name was
changed to PeeringState::recoverable in a subsequent commit in that PR
e4c8bee88). PeeringState::recoverable_and_ge_min_size had (and has) two
callers: choose_acting and choose_async_recovery_ec. For choose_acting,
this change is correct. However, for choose_async_recovery_ec, we don't
want to reduce the acting set size below min_size as it would prevent
the PG doing IO during recovery.

PeeringState::choose_async_recovery_replicated already correctly checks
min_size.

Fixes: https://tracker.ceph.com/issues/62338
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 2fc5486ea2f89e0ca7fce9e36ee2dfbe3743725d)
src/osd/PeeringState.cc