]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/tools/rbd_mirror/LeaderWatcher.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / tools / rbd_mirror / LeaderWatcher.cc
index ae705e3c5e263442abf5b35d0f2d1d5b8a48c7bc..8f12af14c8cef1eaa441d2c54c74293728fc2c20 100644 (file)
@@ -9,6 +9,7 @@
 #include "cls/rbd/cls_rbd_client.h"
 #include "include/stringify.h"
 #include "librbd/Utils.h"
+#include "librbd/asio/ContextWQ.h"
 #include "librbd/watcher/Types.h"
 #include "Threads.h"
 
@@ -35,9 +36,9 @@ LeaderWatcher<I>::LeaderWatcher(Threads<I> *threads, librados::IoCtx &io_ctx,
                            io_ctx.get_pool_name())),
     m_notifier_id(librados::Rados(io_ctx).get_instance_id()),
     m_instance_id(stringify(m_notifier_id)),
-    m_leader_lock(new LeaderLock(m_ioctx, m_work_queue, m_oid, this, true,
-                                 m_cct->_conf.get_val<uint64_t>(
-                                   "rbd_blacklist_expire_seconds"))) {
+    m_leader_lock(new LeaderLock(m_ioctx, *m_threads->asio_engine, m_oid, this,
+                                 true, m_cct->_conf.get_val<uint64_t>(
+                                   "rbd_blocklist_expire_seconds"))) {
 }
 
 template <typename I>
@@ -249,9 +250,9 @@ void LeaderWatcher<I>::handle_wait_for_tasks() {
 }
 
 template <typename I>
-bool LeaderWatcher<I>::is_blacklisted() const {
+bool LeaderWatcher<I>::is_blocklisted() const {
   std::lock_guard locker{m_lock};
-  return m_blacklisted;
+  return m_blocklisted;
 }
 
 template <typename I>
@@ -1021,9 +1022,9 @@ template <typename I>
 void LeaderWatcher<I>::handle_rewatch_complete(int r) {
   dout(5) << "r=" << r << dendl;
 
-  if (r == -EBLACKLISTED) {
-    dout(1) << "blacklisted detected" << dendl;
-    m_blacklisted = true;
+  if (r == -EBLOCKLISTED) {
+    dout(1) << "blocklisted detected" << dendl;
+    m_blocklisted = true;
     return;
   }