]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-mirror: s/blacklist/blocklist/i
authorVenky Shankar <vshankar@redhat.com>
Wed, 9 Sep 2020 06:06:48 +0000 (02:06 -0400)
committerVenky Shankar <vshankar@redhat.com>
Thu, 24 Sep 2020 12:18:11 +0000 (08:18 -0400)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/tools/cephfs_mirror/InstanceWatcher.cc
src/tools/cephfs_mirror/InstanceWatcher.h
src/tools/cephfs_mirror/MirrorWatcher.h
src/tools/cephfs_mirror/Watcher.cc
src/tools/cephfs_mirror/Watcher.h
src/tools/cephfs_mirror/watcher/RewatchRequest.cc

index 29335e4ae4e83a4c216ee9c337e3e3813350fa15..393372f9904da553e2f24585b3f6e26c4331bddc 100644 (file)
@@ -107,6 +107,10 @@ void InstanceWatcher::handle_notify(uint64_t notify_id, uint64_t handle,
   acknowledge_notify(notify_id, handle, outbl);
 }
 
+void InstanceWatcher::handle_rewatch_complete(int r) {
+  dout(20) << ": r=" << r << dendl;
+}
+
 void InstanceWatcher::create_instance() {
   dout(20) << dendl;
 
index f88e87abb2b1540b0e6103882993a16b0b37b33a..72da8044edd3a1676dc603ebb5de4c356a7e07d0 100644 (file)
@@ -42,6 +42,7 @@ public:
 
   void handle_notify(uint64_t notify_id, uint64_t handle,
                      uint64_t notifier_id, bufferlist& bl) override;
+  void handle_rewatch_complete(int r) override;
 
 private:
   librados::IoCtx &m_ioctx;
index fcb9eed3ca95b580862ca9d67b50f07f239d0994..d223e9f748c52621120d288c3ed1bdefc7c88508 100644 (file)
@@ -20,7 +20,7 @@ namespace mirror {
 // watch for notifications via cephfs_mirror object (in metadata
 // pool). this is used sending keepalived with keepalive payload
 // being the rados instance address (used by the manager module
-// to blacklist when needed).
+// to blocklist when needed).
 
 class MirrorWatcher : public Watcher {
 public:
index a228d9110778105c605a32a3bd6f6cf0591ac503..1445fce5f23b2d1995ba8d0c5a00bf20d5896994 100644 (file)
@@ -114,7 +114,7 @@ void Watcher::handle_register_watch(int r, Context *on_finish) {
       m_state = STATE_REGISTERING;
       watch_error = true;
     } else {
-      m_watch_blacklisted = (r == -EBLACKLISTED);
+      m_watch_blocklisted = (r == -EBLOCKLISTED);
     }
   }
 
@@ -147,7 +147,7 @@ void Watcher::unregister_watch(Context *on_finish) {
       ceph_assert(r == 0);
       aio_comp->release();
       m_watch_handle = 0;
-      m_watch_blacklisted = false;
+      m_watch_blocklisted = false;
       return;
     }
   }
@@ -163,8 +163,8 @@ void Watcher::handle_error(uint64_t handle, int err) {
 
   if (is_registered()) {
     m_state = STATE_REWATCHING;
-    if (err == -EBLACKLISTED) {
-      m_watch_blacklisted = true;
+    if (err == -EBLOCKLISTED) {
+      m_watch_blocklisted = true;
     }
     m_work_queue->queue(new LambdaContext([this] {
                                             rewatch();
@@ -205,14 +205,14 @@ void Watcher::handle_rewatch(int r) {
     std::scoped_lock locker(m_lock);
     ceph_assert(m_state == STATE_REWATCHING);
 
-    m_watch_blacklisted = false;
+    m_watch_blocklisted = false;
     if (m_unregister_watch_ctx != nullptr) {
       dout(10) << ": skipping rewatch -- unregistering" << dendl;
       m_state = STATE_IDLE;
       std::swap(unregister_watch_ctx, m_unregister_watch_ctx);
-    } else if (r == -EBLACKLISTED) {
-      m_watch_blacklisted = true;
-      derr << ": client blacklisted" << dendl;
+    } else if (r == -EBLOCKLISTED) {
+      m_watch_blocklisted = true;
+      derr << ": client blocklisted" << dendl;
     } else if (r == -ENOENT) {
       dout(5) << ": object " << m_oid << " does not exist" << dendl;
     } else if  (r < 0) {
@@ -249,7 +249,7 @@ void Watcher::handle_rewatch_callback(int r) {
     if (m_unregister_watch_ctx != nullptr) {
       m_state = STATE_IDLE;
       std::swap(unregister_watch_ctx, m_unregister_watch_ctx);
-    } else if (r == -EBLACKLISTED || r == -ENOENT) {
+    } else if (r == -EBLOCKLISTED || r == -ENOENT) {
       m_state = STATE_IDLE;
     } else if (r < 0 || m_watch_error) {
       watch_error = true;
index 860bfc6f5a84f6f6aed54e3cd3f41b8c0da476d5..9e7c54eebbb2c8bdae35914a11194d46b356b77e 100644 (file)
@@ -81,7 +81,7 @@ private:
   mutable ceph::shared_mutex m_lock;
   State m_state;
   bool m_watch_error = false;
-  bool m_watch_blacklisted = false;
+  bool m_watch_blocklisted = false;
   uint64_t m_watch_handle;
   WatchCtx m_watch_ctx;
   Context *m_unregister_watch_ctx = nullptr;
index 5d12bfc4c24db0b45e82ab2b552e140906a345e5..3070e6f8b011840721b28a5efab0c737d039ecd1 100644 (file)
@@ -53,8 +53,8 @@ void RewatchRequest::unwatch() {
 void RewatchRequest::handle_unwatch(int r) {
   dout(20) << ": r=" << r << dendl;
 
-  if (r == -EBLACKLISTED) {
-    derr << ": client blacklisted" << dendl;
+  if (r == -EBLOCKLISTED) {
+    derr << ": client blocklisted" << dendl;
     finish(r);
     return;
   } else if (r < 0) {