From c607d052129764531c511c4362edc07d33e939d5 Mon Sep 17 00:00:00 2001 From: sage Date: Mon, 27 Feb 2006 23:34:28 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@694 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/mds/MDBalancer.cc | 2 ++ ceph/mds/MDStore.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ceph/mds/MDBalancer.cc b/ceph/mds/MDBalancer.cc index 9a5c1d5e5aded..d5f8251bfbb0e 100644 --- a/ceph/mds/MDBalancer.cc +++ b/ceph/mds/MDBalancer.cc @@ -366,6 +366,7 @@ void MDBalancer::do_rebalance(int beat) for (set::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::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 diff --git a/ceph/mds/MDStore.cc b/ceph/mds/MDStore.cc index 332bf843aa8ed..726b78689e632 100644 --- a/ceph/mds/MDStore.cc +++ b/ceph/mds/MDStore.cc @@ -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); } -- 2.39.5