From: Jason Dillaman Date: Fri, 2 Mar 2018 14:41:06 +0000 (-0500) Subject: librbd: avoid potential for lock inversion in journal IO replay X-Git-Tag: v13.0.2~31^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=59802c5255c17ff5715a53c7f57a41ea7413db4c;p=ceph.git librbd: avoid potential for lock inversion in journal IO replay If an IO replay immediately fails due to a image shrink applied after the IO, the lock order will be incorrect. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/journal/Replay.cc b/src/librbd/journal/Replay.cc index da91f28bc0d..2f33ab5e915 100644 --- a/src/librbd/journal/Replay.cc +++ b/src/librbd/journal/Replay.cc @@ -884,7 +884,7 @@ void Replay::handle_aio_modify_complete(Context *on_ready, Context *on_safe, if (r < 0) { lderr(cct) << ": AIO modify op failed: " << cpp_strerror(r) << dendl; - on_safe->complete(r); + m_image_ctx.op_work_queue->queue(on_safe, r); return; }