]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 27 Feb 2006 23:34:28 +0000 (23:34 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 27 Feb 2006 23:34:28 +0000 (23:34 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@694 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/mds/MDBalancer.cc
ceph/mds/MDStore.cc

index 9a5c1d5e5adedcca0054b16819b782f9c754632f..d5f8251bfbb0e56c28c79f01d8518dd86beb1ec3 100644 (file)
@@ -366,6 +366,7 @@ void MDBalancer::do_rebalance(int beat)
   for (set<CDir*>::iterator it = mds->mdcache->imports.begin();
           it != mds->mdcache->imports.end();
           it++) {
+       if ((*it)->is_hashed()) continue;
        double pop = (*it)->popularity[MDS_POP_CURDOM].meta_load();
        if (pop < g_conf.mds_bal_idle_threshold &&
                (*it)->inode != mds->mdcache->get_root()) {
@@ -404,6 +405,7 @@ void MDBalancer::do_rebalance(int beat)
                multimap<int,CDir*>::iterator plast = p.first++;
                
                if (dir->inode->is_root()) continue;
+               if (dir->is_hashed()) continue;
                if (dir->is_freezing() || dir->is_frozen()) continue;  // export pbly already in progress
                double pop = dir->popularity[MDS_POP_CURDOM].meta_load();
                assert(dir->inode->authority() == target);  // cuz that's how i put it in the map, dummy
index 332bf843aa8edc31ab8d2d6ee5190d1bce5d26fe..726b78689e6322d3be1bd7f702acd12075acb282 100644 (file)
@@ -43,7 +43,7 @@ size_t get_hash_offset(int hashcode) {
   if (hashcode < 0)   
        return 0;  // not hashed
   else
-       return (size_t)(1<<30) * (size_t)hashcode;
+       return (size_t)(1<<30) * (size_t)(1+hashcode);
 }