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: v14.1.0~1140^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F24646%2Fhead;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 --- diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index aeb91d50dea7..57adaca3bf4b 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1491,9 +1491,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) { ceph_assert(m_threads->timer_lock.is_locked()); @@ -1509,6 +1508,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(); } }