From ff37c5c348ee811675007fc90c6b09f094ebf372 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 21 Feb 2019 12:37:00 -0500 Subject: [PATCH] rbd-mirror: avoid attempting to reacquire lock if blacklisted The pool replayer state machine will automatically be restarted when a blacklist is detected. Signed-off-by: Jason Dillaman --- src/tools/rbd_mirror/LeaderWatcher.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/rbd_mirror/LeaderWatcher.cc b/src/tools/rbd_mirror/LeaderWatcher.cc index 6606344dc87d7..d1386ba746fc0 100644 --- a/src/tools/rbd_mirror/LeaderWatcher.cc +++ b/src/tools/rbd_mirror/LeaderWatcher.cc @@ -1090,7 +1090,9 @@ template void LeaderWatcher::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 -- 2.39.5