]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fixed deadlock while attempting to flush AIO requests 6508/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 9 Nov 2015 16:22:24 +0000 (11:22 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 9 Nov 2015 16:22:24 +0000 (11:22 -0500)
In-flight AIO requests might force a flush if a snapshot was created
out-of-band.  The flush completion was previously invoked asynchronously,
potentially via the same thread worker handling the AIO request. This
resulted in the flush operation deadlocking since it can't complete.

Fixes: #13726
Backport: infernalis, hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/ImageCtx.cc

index 9090d368d4535532f5c4fa44ed80569f1dd5de98..e0279d1182694028d1554e7d347a18885cf1cbc3 100644 (file)
@@ -785,7 +785,7 @@ public:
   void ImageCtx::flush_async_operations(Context *on_finish) {
     Mutex::Locker l(async_ops_lock);
     if (async_ops.empty()) {
-      op_work_queue->queue(on_finish, 0);
+      on_finish->complete(0);
       return;
     }