From 29e19c1d7d032dbb4fc3a06cb46ee88c5b22587f Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 20 Nov 2017 20:53:38 +0800 Subject: [PATCH] mds: remove unused MDBalancer::export_empties() MDCache::trim() already does the same job Signed-off-by: "Yan, Zheng" --- src/mds/MDBalancer.cc | 20 -------------------- src/mds/MDBalancer.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index 090f71e63bb40..e82a4cf15f22d 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -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 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) { diff --git a/src/mds/MDBalancer.h b/src/mds/MDBalancer.h index 0f802b79a6b7b..b8962cc54b57d 100644 --- a/src/mds/MDBalancer.h +++ b/src/mds/MDBalancer.h @@ -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(); -- 2.39.5