]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: avoid attempting to reacquire lock if blacklisted
authorJason Dillaman <dillaman@redhat.com>
Thu, 21 Feb 2019 17:37:00 +0000 (12:37 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 25 Feb 2019 18:31:43 +0000 (13:31 -0500)
The pool replayer state machine will automatically be restarted
when a blacklist is detected.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/LeaderWatcher.cc

index 6606344dc87d783d4cf178a30467c2d67f7a2d74..d1386ba746fc0107e0a5686cb62943a7b60b991c 100644 (file)
@@ -1090,7 +1090,9 @@ template <typename I>
 void LeaderWatcher<I>::handle_rewatch_complete(int r) {
   dout(5) << "r=" << r << dendl;
 
-  m_leader_lock->reacquire_lock(nullptr);
+  if (r != -EBLACKLISTED) {
+    m_leader_lock->reacquire_lock(nullptr);
+  }
 }
 
 template <typename I>