]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove unused MDBalancer::export_empties()
authorYan, Zheng <zyan@redhat.com>
Mon, 20 Nov 2017 12:53:38 +0000 (20:53 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 19 Apr 2018 00:10:26 +0000 (08:10 +0800)
MDCache::trim() already does the same job

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 29e19c1d7d032dbb4fc3a06cb46ee88c5b22587f)

src/mds/MDBalancer.cc
src/mds/MDBalancer.h

index 4a822333ac7d44a60c63e5906857c6fda5f2f111..f6f17bb750b687265fc8b5ab63b9a4c22d24b4ce 100644 (file)
@@ -447,26 +447,6 @@ void MDBalancer::handle_heartbeat(MHeartbeat *m)
   m->put();
 }
 
-
-void MDBalancer::export_empties()
-{
-  dout(5) << "export_empties checking for empty imports" << dendl;
-
-  std::set<CDir *> subtrees;
-  mds->mdcache->get_fullauth_subtrees(subtrees);
-  for (auto &dir : subtrees) {
-    if (dir->is_freezing() || dir->is_frozen())
-      continue;
-
-    if (!dir->inode->is_base() &&
-       !dir->inode->is_stray() &&
-       dir->get_num_head_items() == 0)
-      mds->mdcache->migrator->export_empty_import(dir);
-  }
-}
-
-
-
 double MDBalancer::try_match(balance_state_t& state, mds_rank_t ex, double& maxex,
                              mds_rank_t im, double& maxim)
 {
index ed2d71af880a19476beef2e03f97ceea14f6134b..4804bc84b46c75c6ec61e717e7b875d85cd9cc7e 100644 (file)
@@ -85,8 +85,6 @@ private:
 
   void handle_export_pins(void);
 
-  void export_empties();
-
   mds_load_t get_load(utime_t now);
   int localize_balancer();
   void send_heartbeat();