From: Jason Dillaman Date: Tue, 7 Apr 2020 16:13:46 +0000 (-0400) Subject: rbd-mirror: fixed race condition with snapshot sync and shutdown X-Git-Tag: v16.1.0~2647^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34408%2Fhead;p=ceph.git rbd-mirror: fixed race condition with snapshot sync and shutdown Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc b/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc index 9844f27dd327..52ab795aaa86 100644 --- a/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc +++ b/src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc @@ -784,6 +784,10 @@ void Replayer::request_sync() { dout(10) << dendl; std::unique_lock locker{m_lock}; + if (is_replay_interrupted(&locker)) { + return; + } + auto ctx = create_async_context_callback( m_threads->work_queue, create_context_callback< Replayer, &Replayer::handle_request_sync>(this));