From: Jason Dillaman Date: Wed, 17 Oct 2018 21:16:05 +0000 (-0400) Subject: rbd-mirror: always attempt to restart canceled status update task X-Git-Tag: v13.2.3~27^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f51c91fa02a2a4fe3095949f007dfd1b2f1ad2ce;p=ceph.git rbd-mirror: always attempt to restart canceled status update task Fixes: http://tracker.ceph.com/issues/36500 Signed-off-by: Jason Dillaman (cherry picked from commit d3363e61395bc5789533285c77ccff5be0c4b412) --- diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index e2b340bf5df..986e5d61792 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1484,9 +1484,8 @@ void ImageReplayer::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::reschedule_update_status_task(int new_interval) { } if (canceled_task) { + // decrement in-flight status update counter for canceled task finish_mirror_image_status_update(); } }