]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: always attempt to restart canceled status update task 24916/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 17 Oct 2018 21:16:05 +0000 (17:16 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 3 Nov 2018 23:17:50 +0000 (00:17 +0100)
Fixes: http://tracker.ceph.com/issues/36500
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit d3363e61395bc5789533285c77ccff5be0c4b412)

src/tools/rbd_mirror/ImageReplayer.cc

index e2b340bf5dfcaf335832730ae973face42b1f9f4..986e5d617929489d81fc0c40b59f2e3945e8c21b 100644 (file)
@@ -1484,9 +1484,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) {
           assert(m_threads->timer_lock.is_locked());
@@ -1502,6 +1501,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();
   }
 }