From: Jason Dillaman Date: Wed, 27 Jan 2016 19:14:28 +0000 (-0500) Subject: librbd: block maintenance until after journal is ready X-Git-Tag: v10.0.4~148^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7382%2Fhead;p=ceph.git librbd: block maintenance until after journal is ready Ops were already blocked when the requests were received via watch/notify. Requests are now blocked for local requests as well. Fixes: #14510 Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/Operations.cc b/src/librbd/Operations.cc index 563c9dede70f..719baf5c19f6 100644 --- a/src/librbd/Operations.cc +++ b/src/librbd/Operations.cc @@ -739,7 +739,8 @@ int Operations::prepare_image_update() { { RWLock::WLocker owner_locker(m_image_ctx.owner_lock); if (m_image_ctx.exclusive_lock != nullptr && - !m_image_ctx.exclusive_lock->is_lock_owner()) { + (!m_image_ctx.exclusive_lock->is_lock_owner() || + !m_image_ctx.exclusive_lock->accept_requests())) { m_image_ctx.exclusive_lock->try_lock(&ctx); trying_lock = true; }