Skip to content

Commit

Permalink
Merge pull request ceph#24646 from dillaman/wip-36500
Browse files Browse the repository at this point in the history
rbd-mirror: always attempt to restart canceled status update task

Reviewed-by: Mykola Golub <mgolub@suse.com>
  • Loading branch information
trociny committed Oct 19, 2018
2 parents 61f7c3f + d3363e6 commit cb48963
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/rbd_mirror/ImageReplayer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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();
}
}
Expand Down

0 comments on commit cb48963

Please sign in to comment.