]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: PG::on_active_actmap() fix SnapTrimEvent stop condition
authorMatan Breizman <mbreizma@redhat.com>
Mon, 24 Apr 2023 12:55:45 +0000 (12:55 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 25 Apr 2023 08:28:42 +0000 (08:28 +0000)
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/osd/pg.cc

index ea95ccae53ff7f7ec5caf875178f5437e0709d89..7b421a7b605a047654a6d0f812e73e5ae0952eb9 100644 (file)
@@ -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);