]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
* noisy about replication
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 4 Jun 2007 21:10:15 +0000 (21:10 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 4 Jun 2007 21:10:15 +0000 (21:10 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1393 29311d96-e01e-0410-9327-a35deaab8ce9

branches/sage/cephmds2/mds/MDBalancer.cc

index 9006a147f9609405a66eb425b2eaf4711dff6412..dc1e55e6e92aed4983d65e30da8c79dfe9060ef7 100644 (file)
@@ -705,13 +705,22 @@ void MDBalancer::find_exports(CDir *dir,
 void MDBalancer::hit_inode(CInode *in, int type)
 {
   // hit me
-  in->popularity[MDS_POP_JUSTME].pop[type].hit();
-  in->popularity[MDS_POP_NESTED].pop[type].hit();
+  float me = in->popularity[MDS_POP_JUSTME].pop[type].hit();
+  float nested = in->popularity[MDS_POP_NESTED].pop[type].hit();
+  float curdom = 0;
+  float anydom = 0;
   if (in->is_auth()) {
-    in->popularity[MDS_POP_CURDOM].pop[type].hit();
-    in->popularity[MDS_POP_ANYDOM].pop[type].hit();
+    curdom = in->popularity[MDS_POP_CURDOM].pop[type].hit();
+    anydom = in->popularity[MDS_POP_ANYDOM].pop[type].hit();
   }
-  
+
+  dout(-20) << "hit_inode " << type << " pop " << me << " me, "
+           << nested << " nested, "
+           << curdom << " curdom, " 
+           << anydom << " anydom" 
+           << " on " << *in
+           << endl;
+
   // hit auth up to import
   CDir *dir = in->get_parent_dir();
   if (dir) hit_dir(dir, type);
@@ -727,7 +736,8 @@ void MDBalancer::hit_dir(CDir *dir, int type)
   if (g_conf.num_mds > 2 &&             // FIXME >2 thing
       !dir->inode->is_root() &&        // not root (for now at least)
       dir->is_auth()) {
-    //dout(-20) << "hit_dir " << type << " pop is " << v << "  " << *dir << endl;
+    dout(-20) << "hit_dir " << type << " pop " << v << " me "
+             << *dir << endl;
 
     // hash this dir?  (later?)
     if (((v > g_conf.mds_bal_hash_rd && type == META_POP_IRD) ||
@@ -755,6 +765,8 @@ void MDBalancer::hit_recursive(CDir *dir, int type)
   // replicate?
   float dir_pop = dir->popularity[MDS_POP_CURDOM].pop[type].get();    // hmm??
 
+  dout(-20) << "hit_recursive " << dir_pop << " curdom " << *dir << endl;
+
   if (dir->is_auth()) {
     if (!dir->is_rep() &&
         dir_pop >= g_conf.mds_bal_replicate_threshold) {