]> git.apps.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>
Tue, 10 Apr 2018 01:19:47 +0000 (09:19 +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>
src/mds/MDBalancer.cc

index c0cea34efa99b50f0237f5342b61237ad094689e..229092308eef7e3b3736b638a3d3ad54d3cb4d2a 100644 (file)
@@ -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);