]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: remove frozen export pin from queue
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 7 Mar 2020 03:15:03 +0000 (19:15 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 24 Jun 2020 22:43:30 +0000 (15:43 -0700)
The export already belongs on the node id so there's no need to keep it
in the queue.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/MDBalancer.cc

index a44877d21c3eeb2f923e0380bb82a10876e0aefa..f7520070452588973b80a087130659302a1874bb 100644 (file)
@@ -129,17 +129,18 @@ void MDBalancer::handle_export_pins(void)
          mds->mdcache->try_subtree_merge(dir);
        }
       } else if (export_pin == mds->get_nodeid()) {
-       if (dir->state_test(CDir::STATE_CREATING) ||
-           dir->is_frozen() || dir->is_freezing()) {
+        if (dir->state_test(CDir::STATE_AUXSUBTREE)) {
+          ceph_assert(dir->is_subtree_root());
+        } else if (dir->state_test(CDir::STATE_CREATING) ||
+                  dir->is_frozen() || dir->is_freezing()) {
          // try again later
          remove = false;
          continue;
-       }
-       if (!dir->is_subtree_root()) {
+       } else if (!dir->is_subtree_root()) {
          dir->state_set(CDir::STATE_AUXSUBTREE);
          mds->mdcache->adjust_subtree_auth(dir, mds->get_nodeid());
          dout(10) << " create aux subtree on " << *dir << dendl;
-       } else if (!dir->state_test(CDir::STATE_AUXSUBTREE)) {
+       } else {
          dout(10) << " set auxsubtree bit on " << *dir << dendl;
          dir->state_set(CDir::STATE_AUXSUBTREE);
        }