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: v15.2.5~84^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b61ed87922bf174bf6ef7ffd1cda543016e37048;p=ceph.git osd: Arrange code so that it is clearer should not cause any change Signed-off-by: David Zafman (cherry picked from commit ef9ab850d87a84ce42c2c8df1c9b502b2fb04989) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 2dcecd9a55a3..014271382c51 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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();