From: Sage Weil Date: Mon, 25 Oct 2010 22:07:41 +0000 (-0700) Subject: mds: fix up mds_bal_frag options X-Git-Tag: v0.23~106 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00d5442857e468bb7d8db78db682288eeed00d37;p=ceph.git mds: fix up mds_bal_frag options Use the mds_bal_frag option to enable/disable. Make checks consistent. Signed-off-by: Sage Weil --- diff --git a/src/config.cc b/src/config.cc index d8cfdd302a96..894b3b482278 100644 --- a/src/config.cc +++ b/src/config.cc @@ -446,7 +446,7 @@ static struct config_option config_optionsp[] = { OPTION(mds_bal_sample_interval, 0, OPT_FLOAT, 3.0), // every 5 seconds OPTION(mds_bal_replicate_threshold, 0, OPT_FLOAT, 8000), OPTION(mds_bal_unreplicate_threshold, 0, OPT_FLOAT, 0), - OPTION(mds_bal_frag, 0, OPT_BOOL, true), + OPTION(mds_bal_frag, 0, OPT_BOOL, false), OPTION(mds_bal_split_size, 0, OPT_INT, 10000), OPTION(mds_bal_split_rd, 0, OPT_FLOAT, 25000), OPTION(mds_bal_split_wr, 0, OPT_FLOAT, 10000), @@ -454,7 +454,7 @@ static struct config_option config_optionsp[] = { OPTION(mds_bal_merge_rd, 0, OPT_FLOAT, 1000), OPTION(mds_bal_merge_wr, 0, OPT_FLOAT, 1000), OPTION(mds_bal_interval, 0, OPT_INT, 10), // seconds - OPTION(mds_bal_fragment_interval, 0, OPT_INT, -1), // seconds + OPTION(mds_bal_fragment_interval, 0, OPT_INT, 5), // seconds OPTION(mds_bal_idle_threshold, 0, OPT_FLOAT, 0), OPTION(mds_bal_max, 0, OPT_INT, -1), OPTION(mds_bal_max_until, 0, OPT_INT, -1), diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index 7d65746365e1..29e1de4a917a 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -98,7 +98,7 @@ void MDBalancer::tick() } // hash? - if (g_conf.mds_bal_fragment_interval > 0 && + if (g_conf.mds_bal_frag && g_conf.mds_bal_fragment_interval > 0 && now.sec() - last_fragment.sec() > g_conf.mds_bal_fragment_interval) { last_fragment = now; do_fragmenting(); @@ -906,7 +906,7 @@ void MDBalancer::hit_dir(utime_t now, CDir *dir, int type, int who, double amoun // hit modify counter, if this was a modify if (//g_conf.num_mds > 2 && // FIXME >2 thing - g_conf.mds_bal_frag && + g_conf.mds_bal_frag && g_conf.mds_bal_fragment_interval > 0 && !dir->inode->is_base() && // not root/base (for now at least) dir->is_auth() &&