]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix up mds_bal_frag options
authorSage Weil <sage@newdream.net>
Mon, 25 Oct 2010 22:07:41 +0000 (15:07 -0700)
committerSage Weil <sage@newdream.net>
Mon, 25 Oct 2010 23:44:22 +0000 (16:44 -0700)
Use the mds_bal_frag option to enable/disable.  Make checks consistent.

Signed-off-by: Sage Weil <sage@newdream.net>
src/config.cc
src/mds/MDBalancer.cc

index d8cfdd302a9631e58ce75388e0c36ccd4670ed10..894b3b4822780766270e9ccdc75c0da86c4c990c 100644 (file)
@@ -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),
index 7d65746365e19cc122c88d96ea7dad906eafa23e..29e1de4a917a801d8e1614f7dfeab1c164fddea6 100644 (file)
@@ -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() &&