From 86ef725c34ae950c0e41e89c1aa0c6a15e40f369 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Mon, 20 Jun 2016 10:32:04 -0400 Subject: [PATCH] librbd: fix lockdep issue when duplicate event detected Fixes: http://tracker.ceph.com/issues/16363 Signed-off-by: Jason Dillaman --- src/librbd/journal/Replay.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librbd/journal/Replay.cc b/src/librbd/journal/Replay.cc index 8576e2ab3c23..58d5dcd1be3e 100644 --- a/src/librbd/journal/Replay.cc +++ b/src/librbd/journal/Replay.cc @@ -735,8 +735,11 @@ Context *Replay::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; } -- 2.47.3