From 70ba356bbdd5c10979f9ff6a630de23d8304fb35 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 6 Mar 2020 19:15:03 -0800 Subject: [PATCH] mds: remove frozen export pin from queue The export already belongs on the node id so there's no need to keep it in the queue. Signed-off-by: Patrick Donnelly --- src/mds/MDBalancer.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index a44877d21c3..f7520070452 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -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); } -- 2.47.3