]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: fixed race condition with snapshot sync and shutdown
authorJason Dillaman <dillaman@redhat.com>
Tue, 7 Apr 2020 16:13:46 +0000 (12:13 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 28 Apr 2020 17:52:07 +0000 (19:52 +0200)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 8a18a7fc71944c55e7a5fa47e55572546b4088db)

src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc

index 9844f27dd327b43572565887ce51162aa5e82375..52ab795aaa86ed8279683fa34733d9f5818138f7 100644 (file)
@@ -784,6 +784,10 @@ void Replayer<I>::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<I>, &Replayer<I>::handle_request_sync>(this));