]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't try exporting subdir if dirfrag is already being exported
authorYan, Zheng <zyan@redhat.com>
Tue, 3 Apr 2018 03:29:54 +0000 (11:29 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 19 Apr 2018 00:10:26 +0000 (08:10 +0800)
It doesn't make sense to call MDBalancer::find_exports() for a dirfrag
that is already being exported.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 15810b436051c220e983b9b6cc268f2bc14acc2d)

src/mds/MDBalancer.cc

index 4a27b015a24130032e1ed73d7844be19196c00f9..f3643f919069806e1058587ec32e0f3b84c86a5e 100644 (file)
@@ -904,6 +904,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;
@@ -957,7 +959,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);