try_rebalance(state);
}
-void MDBalancer::hit_targets(const balance_state_t& state)
-{
- utime_t now = ceph_clock_now();
- for (auto &it : state.targets) {
- mds_rank_t target = it.first;
- mds->hit_export_target(now, target, g_conf->mds_bal_target_decay);
- }
-}
-
int MDBalancer::mantle_prep_rebalance()
{
balance_state_t state;
void MDBalancer::try_rebalance(balance_state_t& state)
{
- if (!check_targets(state))
- return;
-
if (g_conf->mds_thrash_exports) {
dout(5) << "mds_thrash is on; not performing standard rebalance operation!"
<< dendl;
mds->mdcache->show_subtrees();
}
-
-/* Check that all targets are in the MDSMap export_targets for my rank. */
-bool MDBalancer::check_targets(const balance_state_t& state)
-{
- for (const auto &it : state.targets) {
- if (!mds->is_export_target(it.first)) {
- return false;
- }
- }
- return true;
-}
-
void MDBalancer::find_exports(CDir *dir,
double amount,
list<CDir*>& exports,
void export_empties();
int localize_balancer();
- bool check_targets(const balance_state_t& state);
- void hit_targets(const balance_state_t& state);
void send_heartbeat();
void handle_heartbeat(MHeartbeat *m);
void find_exports(CDir *dir,