]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix lockdep issue when duplicate event detected 10044/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 20 Jun 2016 14:32:04 +0000 (10:32 -0400)
committerLoic Dachary <ldachary@redhat.com>
Thu, 30 Jun 2016 07:20:36 +0000 (09:20 +0200)
Fixes: http://tracker.ceph.com/issues/16363
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 86ef725c34ae950c0e41e89c1aa0c6a15e40f369)

src/librbd/journal/Replay.cc

index c57202a0ba31b1dad9331a75900d58a496471606..3c3bc74aee4d3279b48a4ec6d2d06cd0ba1c346b 100644 (file)
@@ -708,8 +708,11 @@ Context *Replay<I>::create_op_context_callback(uint64_t op_tid,
   assert(m_lock.is_locked());
   if (m_op_events.count(op_tid) != 0) {
     lderr(cct) << "duplicate op tid detected: " << op_tid << dendl;
+
+    // on_ready is already async but on failure invoke on_safe async
+    // as well
     on_ready->complete(0);
-    on_safe->complete(-EINVAL);
+    m_image_ctx.op_work_queue->queue(on_safe, -EINVAL);
     return nullptr;
   }