]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: removed unused pool name from cluster watcher
authorJason Dillaman <dillaman@redhat.com>
Thu, 20 Apr 2017 19:17:26 +0000 (15:17 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 21 Apr 2017 02:38:18 +0000 (22:38 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/rbd_mirror/test_ClusterWatcher.cc
src/tools/rbd_mirror/ClusterWatcher.cc
src/tools/rbd_mirror/ClusterWatcher.h

index a0c39876d9cca2e06df8c60c4a6357eeb19207da..2fd894c702e788b7549ab8f08b77e1a22b71aa38 100644 (file)
@@ -65,7 +65,6 @@ public:
                                                   peer.cluster_name,
                                                   peer.client_name));
       m_pool_peers[pool_id].insert(peer);
-      m_mirrored_pools.insert(pool_name);
     }
     if (name != nullptr) {
       *name = pool_name;
@@ -77,7 +76,6 @@ public:
     ASSERT_GE(pool_id, 0);
     if (m_pool_peers.find(pool_id) != m_pool_peers.end()) {
       m_pool_peers[pool_id].erase(peer);
-      m_mirrored_pools.erase(name);
       if (m_pool_peers[pool_id].empty()) {
        m_pool_peers.erase(pool_id);
       }
@@ -126,7 +124,6 @@ public:
     m_cluster_watcher->refresh_pools();
     Mutex::Locker l(m_lock);
     ASSERT_EQ(m_pool_peers, m_cluster_watcher->get_pool_peers());
-    ASSERT_EQ(m_mirrored_pools, m_cluster_watcher->get_pool_names());
   }
 
   Mutex m_lock;
@@ -134,7 +131,6 @@ public:
   unique_ptr<ClusterWatcher> m_cluster_watcher;
 
   set<string> m_pools;
-  set<string> m_mirrored_pools;
   ClusterWatcher::PoolPeers m_pool_peers;
 };
 
index 90dd61d405ed686a3eca33cd86a9fb341d1c75d9..e193b8ccdf516b6f46b9354136aefcce86918dd6 100644 (file)
@@ -38,12 +38,6 @@ const ClusterWatcher::PoolPeers& ClusterWatcher::get_pool_peers() const
   return m_pool_peers;
 }
 
-const ClusterWatcher::PoolNames& ClusterWatcher::get_pool_names() const
-{
-  assert(m_lock.is_locked());
-  return m_pool_names;
-}
-
 void ClusterWatcher::refresh_pools()
 {
   dout(20) << "enter" << dendl;
@@ -54,7 +48,6 @@ void ClusterWatcher::refresh_pools()
 
   Mutex::Locker l(m_lock);
   m_pool_peers = pool_peers;
-  m_pool_names = pool_names;
   // TODO: perhaps use a workqueue instead, once we get notifications
   // about config changes for existing pools
 }
index b21e49a45743931aa008db2355491352ea0883e3..f101de07ba47b0dc26d6997454f256fb618b47c2 100644 (file)
@@ -35,13 +35,11 @@ public:
   // Caller controls frequency of calls
   void refresh_pools();
   const PoolPeers& get_pool_peers() const;
-  const PoolNames& get_pool_names() const;
 
 private:
   Mutex &m_lock;
   RadosRef m_cluster;
   PoolPeers m_pool_peers;
-  PoolNames m_pool_names;
 
   void read_pool_peers(PoolPeers *pool_peers, PoolNames *pool_names);
 };