]> 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>
Mon, 22 May 2023 15:49:36 +0000 (15:49 +0000)
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 03ff8f206ab681eb1518e7e73d737bce40ab7a15)

src/crimson/osd/pg.cc

index 9400f1a260028d7140d885e4bfb106d6d7f021cf..56bc997783357b3a358248024ff0f6610e25efd2 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);