]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrubber: move m_remote_osd_resource.reset() into advance_token()
authorSamuel Just <sjust@redhat.com>
Wed, 8 Feb 2023 06:57:03 +0000 (06:57 +0000)
committerSamuel Just <sjust@redhat.com>
Wed, 12 Apr 2023 03:39:19 +0000 (20:39 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/scrubber/pg_scrubber.cc

index c9896946da81b22e53e99979bec683903e74e90d..42a89789b3ce95ab485acdead67a0e596c98a54d 100644 (file)
@@ -1600,7 +1600,6 @@ void PgScrubber::handle_scrub_reserve_request(OpRequestRef op)
   /* The primary may unilaterally restart the scrub process without notifying
    * replicas.  Unconditionally clear any existing state prior to handling
    * the new reservation. */
-  m_remote_osd_resource.reset();
   advance_token();
   
   bool granted{false};
@@ -1663,7 +1662,6 @@ void PgScrubber::handle_scrub_reserve_release(OpRequestRef op)
    *  the old tag will be discarded.
    */
   advance_token();
-  m_remote_osd_resource.reset();
 }
 
 void PgScrubber::discard_replica_reservations()
@@ -2352,6 +2350,7 @@ void PgScrubber::advance_token()
   // place. We will, though, verify that. And if we are actually still handling
   // a stale request - both our internal state and the FSM state will be
   // cleared.
+  m_remote_osd_resource.reset();
   replica_handling_done();
   m_fsm->process_event(FullReset{});
 }