From: xie xingguo Date: Thu, 4 Aug 2016 05:56:31 +0000 (+0800) Subject: osd: drop duplicated sched_scrub during tick() X-Git-Tag: v11.0.1~409^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d4459541f66fa3ccc46e54d7e1ebf004f4cab878;p=ceph.git 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 --- 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)); }