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 <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2016-03-25 11:01:01 -04:00
parent e1c61f59ae
commit 970a17368a

View File

@ -373,7 +373,8 @@ void ExclusiveLock<I>::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();