From: Jason Dillaman Date: Thu, 2 Jun 2016 04:42:30 +0000 (-0400) Subject: librbd: notify image feature update before releasing lock X-Git-Tag: v10.2.2~18^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b48cdb21da2ba02ae4ee5398c38b48e857dba8cf;p=ceph.git librbd: notify image feature update before releasing lock If a client is waiting for the lock, ensure it sees the latest version of the image features. Signed-off-by: Jason Dillaman (cherry picked from commit f601ea835bb78554ac767ccb11789df960765bf9) --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 2445bdacd3ba..bfbad16b1e82 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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; }