]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Arrange code so that it is clearer should not cause any change
authorDavid Zafman <dzafman@redhat.com>
Thu, 23 Jul 2020 16:40:54 +0000 (09:40 -0700)
committerDavid Zafman <dzafman@redhat.com>
Sat, 25 Jul 2020 16:11:42 +0000 (16:11 +0000)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit ef9ab850d87a84ce42c2c8df1c9b502b2fb04989)

src/osd/OSD.cc

index 2dcecd9a55a3fd8f914d166792c30bb5587bdd8e..014271382c51ab280879f8811f085c97f36a5098 100644 (file)
@@ -7425,16 +7425,15 @@ void OSD::sched_scrub()
     return;
   }
   bool allow_requested_repair_only = false;
-  if (service.is_recovery_active()) {
-    if (!cct->_conf->osd_scrub_during_recovery && cct->_conf->osd_repair_during_recovery) {
-      dout(10) << __func__
-               << " will only schedule explicitly requested repair due to active recovery"
-               << dendl;
-      allow_requested_repair_only = true;
-    } else if (!cct->_conf->osd_scrub_during_recovery && !cct->_conf->osd_repair_during_recovery) {
+  if (service.is_recovery_active() && !cct->_conf->osd_scrub_during_recovery) {
+    if (!cct->_conf->osd_repair_during_recovery) {
       dout(20) << __func__ << " not scheduling scrubs due to active recovery" << dendl;
       return;
     }
+    dout(10) << __func__
+             << " will only schedule explicitly requested repair due to active recovery"
+             << dendl;
+    allow_requested_repair_only = true;
   }
 
   utime_t now = ceph_clock_now();