]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: notify image feature update before releasing lock
authorJason Dillaman <dillaman@redhat.com>
Thu, 2 Jun 2016 04:42:30 +0000 (00:42 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 9 Jun 2016 18:04:08 +0000 (14:04 -0400)
If a client is waiting for the lock, ensure it sees the latest
version of the image features.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f601ea835bb78554ac767ccb11789df960765bf9)

src/librbd/internal.cc

index 2445bdacd3bab2964084337a4c9926f04d37690f..bfbad16b1e8240d6c910ff3b6355b3cd298b3998 100644 (file)
@@ -1869,6 +1869,8 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
       }
     }
 
+    ictx->notify_update();
+
     if (ictx->exclusive_lock != nullptr && acquired_lock) {
       C_SaferCond lock_ctx;
       ictx->exclusive_lock->release_lock(&lock_ctx);
@@ -1878,8 +1880,6 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
         return r;
       }
     }
-
-    ictx->notify_update();
     return 0;
   }