]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: ensure librados callbacks are flushed prior to destroying image 7485/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 23 Dec 2015 17:06:50 +0000 (12:06 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 3 Feb 2016 03:00:59 +0000 (22:00 -0500)
Fixes: #14092
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 98157ab3274bd960e4487e34f5a83e9c921a6ac8)

src/librbd/ImageCtx.cc

index c8df238bf150dc6fd2f34b0c7a1a14605df16795..3a47565e3aca2a5bf7967c0f305f6df5ba0780e3 100644 (file)
@@ -246,6 +246,11 @@ void _flush_async_operations(ImageCtx *ictx, Context *on_finish) {
     }
     delete[] format_string;
 
+    md_ctx.aio_flush();
+    data_ctx.aio_flush();
+    op_work_queue->drain();
+    aio_work_queue->drain();
+
     delete op_work_queue;
     delete aio_work_queue;
   }