From: Jason Dillaman Date: Mon, 10 Sep 2018 18:12:26 +0000 (-0400) Subject: rbd-mirror: cluster watcher doesn't need to resolve pool names X-Git-Tag: v14.0.1~288^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1cbcaaab2450247a3264caeedb7ab1b43670ca42;p=ceph-ci.git rbd-mirror: cluster watcher doesn't need to resolve pool names Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/ClusterWatcher.cc b/src/tools/rbd_mirror/ClusterWatcher.cc index e0c06d5ce7f..bff1b2304d3 100644 --- a/src/tools/rbd_mirror/ClusterWatcher.cc +++ b/src/tools/rbd_mirror/ClusterWatcher.cc @@ -45,8 +45,7 @@ void ClusterWatcher::refresh_pools() dout(20) << "enter" << dendl; PoolPeers pool_peers; - PoolNames pool_names; - read_pool_peers(&pool_peers, &pool_names); + read_pool_peers(&pool_peers); Mutex::Locker l(m_lock); m_pool_peers = pool_peers; @@ -54,8 +53,7 @@ void ClusterWatcher::refresh_pools() // about config changes for existing pools } -void ClusterWatcher::read_pool_peers(PoolPeers *pool_peers, - PoolNames *pool_names) +void ClusterWatcher::read_pool_peers(PoolPeers *pool_peers) { int r = m_cluster->wait_for_latest_osdmap(); if (r < 0) { @@ -143,7 +141,6 @@ void ClusterWatcher::read_pool_peers(PoolPeers *pool_peers, } pool_peers->insert({pool_id, Peers{configs.begin(), configs.end()}}); - pool_names->insert(pool_name); } for (auto it = m_service_pools.begin(); it != m_service_pools.end(); ) { diff --git a/src/tools/rbd_mirror/ClusterWatcher.h b/src/tools/rbd_mirror/ClusterWatcher.h index 7080a1c6a99..9941d15c9ca 100644 --- a/src/tools/rbd_mirror/ClusterWatcher.h +++ b/src/tools/rbd_mirror/ClusterWatcher.h @@ -31,7 +31,6 @@ class ClusterWatcher { public: typedef std::set Peers; typedef std::map PoolPeers; - typedef std::set PoolNames; ClusterWatcher(RadosRef cluster, Mutex &lock, ServiceDaemon* service_daemon); @@ -53,7 +52,7 @@ private: ServicePools m_service_pools; PoolPeers m_pool_peers; - void read_pool_peers(PoolPeers *pool_peers, PoolNames *pool_names); + void read_pool_peers(PoolPeers *pool_peers); }; } // namespace mirror