From 2c353a854fd975ccfb00b33fe76cd77195f70d18 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 27 Jan 2016 14:14:28 -0500 Subject: [PATCH] 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 --- src/librbd/Operations.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.47.3