From: Ronen Friedman Date: Tue, 4 Jun 2024 08:53:04 +0000 (-0500) Subject: osd/scrub: allow new scrubs while reserving X-Git-Tag: v20.0.0~1731^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cca76b02828ed404ec87bf8cd8c8eae95a25a96b;p=ceph.git osd/scrub: allow new scrubs while reserving 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 --- diff --git a/src/osd/scrubber/osd_scrub.cc b/src/osd/scrubber/osd_scrub.cc index 48f978b18e3e..1df508d9eef6 100644 --- a/src/osd/scrubber/osd_scrub.cc +++ b/src/osd/scrubber/osd_scrub.cc @@ -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) diff --git a/src/osd/scrubber/osd_scrub_sched.cc b/src/osd/scrubber/osd_scrub_sched.cc index 1d0bf614c9b9..da355ec692da 100644 --- a/src/osd/scrubber/osd_scrub_sched.cc +++ b/src/osd/scrubber/osd_scrub_sched.cc @@ -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(); -}