From: Venky Shankar Date: Wed, 9 Sep 2020 06:06:48 +0000 (-0400) Subject: cephfs-mirror: s/blacklist/blocklist/i X-Git-Tag: v16.1.0~786^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ea58d14dbd54ac22c7617b38b094ab8d85a064af;p=ceph.git cephfs-mirror: s/blacklist/blocklist/i Signed-off-by: Venky Shankar --- diff --git a/src/tools/cephfs_mirror/InstanceWatcher.cc b/src/tools/cephfs_mirror/InstanceWatcher.cc index 29335e4ae4e8..393372f9904d 100644 --- a/src/tools/cephfs_mirror/InstanceWatcher.cc +++ b/src/tools/cephfs_mirror/InstanceWatcher.cc @@ -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; diff --git a/src/tools/cephfs_mirror/InstanceWatcher.h b/src/tools/cephfs_mirror/InstanceWatcher.h index f88e87abb2b1..72da8044edd3 100644 --- a/src/tools/cephfs_mirror/InstanceWatcher.h +++ b/src/tools/cephfs_mirror/InstanceWatcher.h @@ -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; diff --git a/src/tools/cephfs_mirror/MirrorWatcher.h b/src/tools/cephfs_mirror/MirrorWatcher.h index fcb9eed3ca95..d223e9f748c5 100644 --- a/src/tools/cephfs_mirror/MirrorWatcher.h +++ b/src/tools/cephfs_mirror/MirrorWatcher.h @@ -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: diff --git a/src/tools/cephfs_mirror/Watcher.cc b/src/tools/cephfs_mirror/Watcher.cc index a228d9110778..1445fce5f23b 100644 --- a/src/tools/cephfs_mirror/Watcher.cc +++ b/src/tools/cephfs_mirror/Watcher.cc @@ -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; diff --git a/src/tools/cephfs_mirror/Watcher.h b/src/tools/cephfs_mirror/Watcher.h index 860bfc6f5a84..9e7c54eebbb2 100644 --- a/src/tools/cephfs_mirror/Watcher.h +++ b/src/tools/cephfs_mirror/Watcher.h @@ -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; diff --git a/src/tools/cephfs_mirror/watcher/RewatchRequest.cc b/src/tools/cephfs_mirror/watcher/RewatchRequest.cc index 5d12bfc4c24d..3070e6f8b011 100644 --- a/src/tools/cephfs_mirror/watcher/RewatchRequest.cc +++ b/src/tools/cephfs_mirror/watcher/RewatchRequest.cc @@ -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) {