]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: utilize common flush helper when closing parent images 6740/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 30 Nov 2015 21:32:10 +0000 (16:32 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 30 Nov 2015 21:32:10 +0000 (16:32 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/internal.cc

index 9c25ba3add7819bbd613fabef10d5529b50fa397..8d2e7945f7320d895b5acf08e2989f0edb4ca8cf 100644 (file)
@@ -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);