From d4459541f66fa3ccc46e54d7e1ebf004f4cab878 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Thu, 4 Aug 2016 13:56:31 +0800 Subject: [PATCH] osd: drop duplicated sched_scrub during tick() We will do it in tick_without_osd_lock(). Also make sure that we do it only if the OSD is currently alive. Signed-off-by: xie xingguo --- src/osd/OSD.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0f9e9f62c81d..5248d7a90c4b 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4319,10 +4319,6 @@ void OSD::tick() } if (is_active()) { - if (!scrub_random_backoff()) { - sched_scrub(); - } - check_replay_queue(); service.promote_throttle_recalibrate(); @@ -4402,8 +4398,10 @@ void OSD::tick_without_osd_lock() map_lock.put_read(); } - if (!scrub_random_backoff()) { - sched_scrub(); + if (is_active()) { + if (!scrub_random_backoff()) { + sched_scrub(); + } } tick_timer_without_osd_lock.add_event_after(OSD_TICK_INTERVAL, new C_Tick_WithoutOSDLock(this)); } -- 2.47.3