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: v12.2.11~126^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c2da4cbc068e5200fa8a4b1c5bb7a4a7efbb737;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) Signed-off-by: Nathan Cutler Conflicts: src/tools/rbd_mirror/ImageReplayer.cc - in luminous "canceled task" is mentioned in log at debug level 20 (in master not) --- diff --git a/src/tools/rbd_mirror/ImageReplayer.cc b/src/tools/rbd_mirror/ImageReplayer.cc index 9860089a303b..11bc08bf48c7 100644 --- a/src/tools/rbd_mirror/ImageReplayer.cc +++ b/src/tools/rbd_mirror/ImageReplayer.cc @@ -1503,9 +1503,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()); @@ -1520,6 +1519,7 @@ void ImageReplayer::reschedule_update_status_task(int new_interval) { if (canceled_task) { dout(20) << "canceled task" << dendl; + // decrement in-flight status update counter for canceled task finish_mirror_image_status_update(); } }