]> 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>
Tue, 10 Apr 2018 01:19:46 +0000 (09:19 +0800)
MDCache::trim() already does the same job

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/MDBalancer.cc
src/mds/MDBalancer.h

index 090f71e63bb4019ea74ddc2bb7b4e94d19283930..e82a4cf15f22dfefdc8e34dc40251b102a98687b 100644 (file)
@@ -452,26 +452,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 0f802b79a6b7b4c170e1b4f7375a10fb50abb093..b8962cc54b57d5ce35845ea402d374350c49336a 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();