From: Yan, Zheng Date: Tue, 3 Apr 2018 03:29:54 +0000 (+0800) Subject: mds: don't try exporting subdir if dirfrag is already being exported X-Git-Tag: v13.1.0~332^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=15810b436051c220e983b9b6cc268f2bc14acc2d;p=ceph.git mds: don't try exporting subdir if dirfrag is already being exported It doesn't make sense to call MDBalancer::find_exports() for a dirfrag that is already being exported. Signed-off-by: "Yan, Zheng" --- diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index c0cea34efa99..229092308eef 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -909,6 +909,8 @@ void MDBalancer::try_rebalance(balance_state_t& state) for (auto dir : fullauthsubs) { if (dir->get_inode()->is_mdsdir()) continue; + if (dir->is_freezing() || dir->is_frozen()) + continue; // export pbly already in progress find_exports(dir, amount, exports, have, already_exporting); if (have > amount-MIN_OFFLOAD) break; @@ -962,7 +964,7 @@ void MDBalancer::find_exports(CDir *dir, if (!subdir->is_auth()) continue; if (already_exporting.count(subdir)) continue; - if (subdir->is_frozen()) continue; // can't export this right now! + if (subdir->is_frozen() || subdir->is_freezing()) continue; // can't export this right now! // how popular? double pop = subdir->pop_auth_subtree.meta_load(rebalance_time, mds->mdcache->decayrate);