]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: blacklist journal error while attempting to acquire lock
authorJason Dillaman <dillaman@redhat.com>
Fri, 25 Mar 2016 15:01:01 +0000 (11:01 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 29 Mar 2016 19:19:25 +0000 (15:19 -0400)
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>
src/librbd/ExclusiveLock.cc

index bd945e6a233114cab6e98243bd6f77625223db5c..82d00425e0bd89699a7ab0047496d6330f309439 100644 (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();