From: Matan Breizman Date: Mon, 24 Apr 2023 12:55:45 +0000 (+0000) Subject: crimson/osd/pg: PG::on_active_actmap() fix SnapTrimEvent stop condition X-Git-Tag: v19.0.0~1329^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=03ff8f206ab681eb1518e7e73d737bce40ab7a15;p=ceph.git crimson/osd/pg: PG::on_active_actmap() fix SnapTrimEvent stop condition Signed-off-by: Matan Breizman --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index ea95ccae53f..7b421a7b605 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -453,9 +453,10 @@ void PG::on_active_actmap() { logger().debug("{}: {} snap_trimq={}", *this, __func__, snap_trimq); peering_state.state_clear(PG_STATE_SNAPTRIM_ERROR); + // loops until snap_trimq is empty or SNAPTRIM_ERROR. std::ignore = seastar::do_until( [this] { return snap_trimq.empty() - && !peering_state.state_test(PG_STATE_SNAPTRIM_ERROR); + || peering_state.state_test(PG_STATE_SNAPTRIM_ERROR); }, [this] { peering_state.state_set(PG_STATE_SNAPTRIM);