From: David Zafman Date: Thu, 23 Jul 2020 16:40:54 +0000 (-0700) Subject: osd: Arrange code so that it is clearer should not cause any change X-Git-Tag: wip-pdonnell-testing-20200918.022351~568^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ef9ab850d87a84ce42c2c8df1c9b502b2fb04989;p=ceph-ci.git osd: Arrange code so that it is clearer should not cause any change Signed-off-by: David Zafman --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d4983826d17..3856294f8ed 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7447,16 +7447,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();