]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: fixed race condition with snapshot sync and shutdown 34408/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 7 Apr 2020 16:13:46 +0000 (12:13 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 8 Apr 2020 13:45:39 +0000 (09:45 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
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));