]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop duplicated sched_scrub during tick()
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 4 Aug 2016 05:56:31 +0000 (13:56 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 4 Aug 2016 21:57:21 +0000 (05:57 +0800)
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 <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index 0f9e9f62c81dca671a481c103d7d9b16f1440842..5248d7a90c4bbb865abbb31cb54ea962c3436774 100644 (file)
@@ -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));
 }