]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: block maintenance until after journal is ready 7382/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 27 Jan 2016 19:14:28 +0000 (14:14 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 27 Jan 2016 19:14:28 +0000 (14:14 -0500)
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 <dillaman@redhat.com>
src/librbd/Operations.cc

index 563c9dede70ff538ccaf2cf9fafc9c9e87d58197..719baf5c19f608463971dcc2d5a0b95784ff2451 100644 (file)
@@ -739,7 +739,8 @@ int Operations<I>::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;
     }