]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: flush pending ops while not holding lock 4528/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 12 May 2015 14:19:48 +0000 (10:19 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 4 Jun 2015 20:52:05 +0000 (16:52 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/ImageWatcher.cc
src/librbd/internal.cc

index 05b592f171046b2e5340550584f564ac2b12f763..a8a7c2114d8812f5e9d3565dcfd3258e61bf1b99 100644 (file)
@@ -379,6 +379,7 @@ bool ImageWatcher::release_lock()
 
   m_image_ctx.owner_lock.put_write();
   m_image_ctx.cancel_async_requests();
+  m_image_ctx.flush_async_operations();
   m_image_ctx.owner_lock.get_write();
 
   if (!is_lock_owner()) {
index 91620e5a68fe6d4a17f8b010521a3c438bf4d809..92e2b5bfe1953d953371af5fd5e046db5651564d 100644 (file)
@@ -2827,9 +2827,10 @@ reprotect_and_return_err:
     }
 
     ictx->aio_work_queue->drain();
-
     ictx->cancel_async_requests();
+    ictx->flush_async_operations();
     ictx->readahead.wait_for_pending();
+
     if (ictx->object_cacher) {
       ictx->shutdown_cache(); // implicitly flushes
     } else {