From: Jason Dillaman Date: Wed, 23 Dec 2015 17:06:50 +0000 (-0500) Subject: librbd: ensure librados callbacks are flushed prior to destroying image X-Git-Tag: v0.94.7~40^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7485%2Fhead;p=ceph.git librbd: ensure librados callbacks are flushed prior to destroying image Fixes: #14092 Signed-off-by: Jason Dillaman (cherry picked from commit 98157ab3274bd960e4487e34f5a83e9c921a6ac8) --- diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index c8df238bf150..3a47565e3aca 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -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; }