]> 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, 2 Jun 2016 12:32:08 +0000 (08:32 -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>
src/librbd/internal.cc

index 49dea3cc9c486b5d2ff462fe164dc2ccbdf4e07c..9b695bef68d5e2d7b312b09b1eed9b2d93d317e1 100644 (file)
@@ -1884,6 +1884,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);
@@ -1893,8 +1895,6 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
         return r;
       }
     }
-
-    ictx->notify_update();
     return 0;
   }