From: Jason Dillaman Date: Mon, 30 Nov 2015 21:32:10 +0000 (-0500) Subject: librbd: utilize common flush helper when closing parent images X-Git-Tag: v10.0.2~147^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6740%2Fhead;p=ceph.git librbd: utilize common flush helper when closing parent images Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 9c25ba3add78..8d2e7945f732 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -2932,7 +2932,10 @@ int invoke_async_request(ImageCtx *ictx, const std::string& request_type, ImageCtx *parent_ictx = ictx->parent; // AIO to the parent must be complete before closing - parent_ictx->flush_async_operations(); + { + RWLock::RLocker owner_locker(parent_ictx->owner_lock); + parent_ictx->flush(); + } parent_ictx->readahead.wait_for_pending(); { Mutex::Locker async_ops_locker(parent_ictx->async_ops_lock);