]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: always attempt to restart canceled status update task 24646/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 17 Oct 2018 21:16:05 +0000 (17:16 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 17 Oct 2018 21:21:16 +0000 (17:21 -0400)
Fixes: http://tracker.ceph.com/issues/36500
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/ImageReplayer.cc

index aeb91d50dea7e910581daaeca47218a4d911b34a..57adaca3bf4b519d7b16e3412a821e0f1264c6a8 100644 (file)
@@ -1491,9 +1491,8 @@ void ImageReplayer<I>::reschedule_update_status_task(int new_interval) {
       m_update_status_interval = new_interval;
     }
 
-    bool restarting = (new_interval == 0 || canceled_task);
     if (new_interval >= 0 && is_running_() &&
-        start_mirror_image_status_update(false, restarting)) {
+        start_mirror_image_status_update(true, false)) {
       m_update_status_task = new FunctionContext(
         [this](int r) {
           ceph_assert(m_threads->timer_lock.is_locked());
@@ -1509,6 +1508,7 @@ void ImageReplayer<I>::reschedule_update_status_task(int new_interval) {
   }
 
   if (canceled_task) {
+    // decrement in-flight status update counter for canceled task
     finish_mirror_image_status_update();
   }
 }