]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: allow new scrubs while reserving
authorRonen Friedman <rfriedma@redhat.com>
Tue, 4 Jun 2024 08:53:04 +0000 (03:53 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 16 Jun 2024 10:51:33 +0000 (13:51 +0300)
allow new scrub session to be initiated by an OSD even while a PG is
in the process of reserving scrub resources.
The existing restriction made sense when the replica reservation process
was expected to succeed or fail within a few milliseconds. It makes less
sense now that the reservation process is queue-based (Reserver based)
and can take unlimited time (hours, days, ...) to complete.

Fixes: https://tracker.ceph.com/issues/66351
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/osd_scrub.cc
src/osd/scrubber/osd_scrub_sched.cc

index 48f978b18e3ec84b8fbc379511daf8d5b4099606..1df508d9eef655a30b91ea87340b2a8de16f2903 100644 (file)
@@ -171,12 +171,6 @@ Scrub::OSDRestrictions OsdScrub::restrictions_on_scrubbing(
               << dendl;
       env_conditions.high_priority_only = true;
 
-  } else if (m_queue.is_reserving_now()) {
-    // if there is a PG that is just now trying to reserve scrub replica
-    // resources - we should wait and not initiate a new scrub
-    dout(10) << "scrub resources reservation in progress" << dendl;
-    env_conditions.high_priority_only = true;
-
   } else if (is_recovery_active && !conf->osd_scrub_during_recovery) {
     if (conf->osd_repair_during_recovery) {
       dout(15)
index 1d0bf614c9b926d1d4b9278da9f377f61dbdd0d8..da355ec692dace268e9fe441f55777fe69d3e6a6 100644 (file)
@@ -386,9 +386,3 @@ void ScrubQueue::clear_reserving_now(spg_t was_reserving_id)
   }
   // otherwise - ignore silently
 }
-
-bool ScrubQueue::is_reserving_now() const
-{
-  // no lock needed, as set_reserving_now() will recheck
-  return reserving_pg.has_value();
-}