]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/MDBalancer.cc
update sources to v12.2.3
[ceph.git] / ceph / src / mds / MDBalancer.cc
index 186d5f40e91e5278c0d9cb2aef963188e908ea5f..8a8a499a4241a1d08738a31ce07d03e8c10219cf 100644 (file)
@@ -70,7 +70,7 @@ int MDBalancer::proc_message(Message *m)
     break;
 
   default:
-    dout(0) << " balancer unknown message " << m->get_type() << dendl;
+    derr << " balancer unknown message " << m->get_type() << dendl_impl;
     assert(0 == "balancer unknown message");
   }
 
@@ -236,7 +236,7 @@ mds_load_t MDBalancer::get_load(utime_t now)
   if (cpu.is_open())
     cpu >> load.cpu_load_avg;
   else
-    dout(0) << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl;
+    derr << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl_impl;
   
   dout(15) << "get_load " << load << dendl;
   return load;
@@ -280,7 +280,7 @@ int MDBalancer::localize_balancer()
     }
     bal_code.assign(lua_src.to_str());
     bal_version.assign(oid.name);
-    dout(0) << "localized balancer, bal_code=" << bal_code << dendl;
+    dout(10) << "localized balancer, bal_code=" << bal_code << dendl;
   }
   return r;
 }
@@ -385,8 +385,6 @@ void MDBalancer::handle_heartbeat(MHeartbeat *m)
   }
   mds_import_map[ who ] = m->get_import_map();
 
-  //dout(0) << "  load is " << load << " have " << mds_load.size() << dendl;
-
   {
     unsigned cluster_size = mds->get_mds_map()->get_num_in_mds();
     if (mds_load.size() == cluster_size) {
@@ -615,7 +613,7 @@ void MDBalancer::prep_rebalance(int beat)
       mds_meta_load[i] = l;
 
       if (whoami == 0)
-       dout(0) << "  mds." << i
+       dout(5) << "  mds." << i
                << " " << load
                << " = " << load.mds_load()
                << " ~ " << l << dendl;
@@ -809,7 +807,7 @@ void MDBalancer::try_rebalance(balance_state_t& state)
        pop < g_conf->mds_bal_idle_threshold &&
        im->inode != mds->mdcache->get_root() &&
        im->inode->authority().first != mds->get_nodeid()) {
-      dout(0) << " exporting idle (" << pop << ") import " << *im
+      dout(5) << " exporting idle (" << pop << ") import " << *im
              << " back to mds." << im->inode->authority().first
              << dendl;
       mds->mdcache->migrator->export_dir_nicely(im, im->inode->authority().first);
@@ -861,7 +859,7 @@ void MDBalancer::try_rebalance(balance_state_t& state)
        assert(dir->inode->authority().first == target);  // cuz that's how i put it in the map, dummy
 
        if (pop <= amount-have) {
-         dout(0) << "reexporting " << *dir
+         dout(5) << "reexporting " << *dir
                  << " pop " << pop
                  << " back to mds." << target << dendl;
          mds->mdcache->migrator->export_dir_nicely(dir, target);
@@ -890,7 +888,7 @@ void MDBalancer::try_rebalance(balance_state_t& state)
 
        double pop = (*import).first;
        if (pop < amount-have || pop < MIN_REEXPORT) {
-         dout(0) << "reexporting " << *imp
+         dout(5) << "reexporting " << *imp
                  << " pop " << pop
                  << " back to mds." << imp->inode->authority()
                  << dendl;
@@ -921,7 +919,7 @@ void MDBalancer::try_rebalance(balance_state_t& state)
     //fudge = amount - have;
 
     for (list<CDir*>::iterator it = exports.begin(); it != exports.end(); ++it) {
-      dout(0) << "   - exporting "
+      dout(5) << "   - exporting "
               << (*it)->pop_auth_subtree
               << " "
               << (*it)->pop_auth_subtree.meta_load(rebalance_time, mds->mdcache->decayrate)
@@ -1139,7 +1137,7 @@ void MDBalancer::hit_dir(utime_t now, CDir *dir, int type, int who, double amoun
        rd_adj = rdp / mds->get_mds_map()->get_num_in_mds() - rdp;
        rd_adj /= 2.0;  // temper somewhat
 
-       dout(0) << "replicating dir " << *dir << " pop " << dir_pop << " .. rdp " << rdp << " adj " << rd_adj << dendl;
+       dout(5) << "replicating dir " << *dir << " pop " << dir_pop << " .. rdp " << rdp << " adj " << rd_adj << dendl;
 
        dir->dir_rep = CDir::REP_ALL;
        mds->mdcache->send_dir_updates(dir, true);
@@ -1153,7 +1151,7 @@ void MDBalancer::hit_dir(utime_t now, CDir *dir, int type, int who, double amoun
          dir->is_rep() &&
          dir_pop < g_conf->mds_bal_unreplicate_threshold) {
        // unreplicate
-       dout(0) << "unreplicating dir " << *dir << " pop " << dir_pop << dendl;
+       dout(5) << "unreplicating dir " << *dir << " pop " << dir_pop << dendl;
 
        dir->dir_rep = CDir::REP_NONE;
        mds->mdcache->send_dir_updates(dir);