From ff1a49bfa51b4384d5274b96360021421d31966d Mon Sep 17 00:00:00 2001 From: David Zafman Date: Thu, 23 Jul 2020 09:40:54 -0700 Subject: [PATCH] osd: Arrange code so that it is clearer should not cause any change Signed-off-by: David Zafman (cherry picked from commit ef9ab850d87a84ce42c2c8df1c9b502b2fb04989) --- src/osd/OSD.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 8cc4a5bb9f2ad..3cb99c685bd78 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7926,16 +7926,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(); -- 2.39.5