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: v18.1.0~55^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f9eee7bccd1e2e282b3133cf824efc90fd1fd22b;p=ceph.git crimson/osd/pg: PG::on_active_actmap() fix SnapTrimEvent stop condition Signed-off-by: Matan Breizman (cherry picked from commit 03ff8f206ab681eb1518e7e73d737bce40ab7a15) --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 9400f1a260028..56bc997783357 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);