From: Jason Dillaman Date: Fri, 25 Mar 2016 15:01:01 +0000 (-0400) Subject: librbd: blacklist journal error while attempting to acquire lock X-Git-Tag: v10.1.1~64^2~11 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=970a17368a2ce0d94e9ef6a6e4022ca5d86f63ad;p=ceph-ci.git librbd: blacklist journal error while attempting to acquire lock The journal policy will return -EPERM if attempting to acquire the exclusive lock when the image is non-primary. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/ExclusiveLock.cc b/src/librbd/ExclusiveLock.cc index bd945e6a233..82d00425e0b 100644 --- a/src/librbd/ExclusiveLock.cc +++ b/src/librbd/ExclusiveLock.cc @@ -373,7 +373,8 @@ void ExclusiveLock::handle_acquire_lock(int r) { Action action = get_active_action(); assert(action == ACTION_TRY_LOCK || action == ACTION_REQUEST_LOCK); - if (action == ACTION_REQUEST_LOCK && r < 0 && r != -EBLACKLISTED) { + if (action == ACTION_REQUEST_LOCK && r < 0 && r != -EBLACKLISTED && + r != -EPERM) { m_state = STATE_WAITING_FOR_PEER; m_lock.Unlock();