From b48cdb21da2ba02ae4ee5398c38b48e857dba8cf Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 2 Jun 2016 00:42:30 -0400 Subject: [PATCH] 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) --- src/librbd/internal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.47.3