]> 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>
Thu, 16 May 2019 13:28:50 +0000 (09:28 -0400)
The pool replayer state machine will automatically be restarted
when a blacklist is detected.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ff37c5c348ee811675007fc90c6b09f094ebf372)

src/tools/rbd_mirror/LeaderWatcher.cc

index bb8fcf60671c00dc7af7bd52439dcb10f49c2ad3..f2746c661a1039e5075fbd26e0f054c1925e66ca 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>