]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: allow replicas to scrub even if OSD has recovery in progress 55105/head
authorRonen Friedman <rfriedma@redhat.com>
Tue, 9 Jan 2024 12:51:46 +0000 (06:51 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Wed, 10 Jan 2024 08:57:32 +0000 (10:57 +0200)
Limit the check ("not scrubbing if the OSD is performing recovery on
some PG") to the primary OSD. Otherwise - a small number of backfills may
prevent a large number of PGs from scrubbing.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/scrub_machine.cc

index 9aa5842c490850c8dbd3c84efca16f70c9f50c6f..eac26a85f8511f4931937c3493a3d49ff3b65169 100644 (file)
@@ -819,11 +819,6 @@ ReplicaActive::ReservationAttemptRes ReplicaActive::get_remote_reservation()
 {
   using ReservationAttemptRes = ReplicaActive::ReservationAttemptRes;
   DECLARE_LOCALS;  // 'scrbr' & 'pg_id' aliases
-  if (!scrbr->get_pg_cct()->_conf.get_val<bool>("osd_scrub_during_recovery") &&
-      m_osds->is_recovery_active()) {
-    return ReservationAttemptRes{
-       MOSDScrubReserve::REJECT, "recovery is active", false};
-  }
 
   if (m_osds->get_scrub_services().inc_scrubs_remote(scrbr->get_spgid().pgid)) {
     return ReservationAttemptRes{MOSDScrubReserve::GRANT, "", true};