From 0b2b89d63b99418348a860b6cc2a48dd2325463f Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Thu, 7 Mar 2019 10:30:09 +0530 Subject: [PATCH] mds: check earlier if directories are already exported Signed-off-by: Rishabh Dave (cherry picked from commit 46fb90734f371b5467d81cae25c06f8a487a3041) --- src/mds/Migrator.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 6ca71da2fc4..28d3066ebce 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -777,6 +777,11 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest) ceph_assert(dir->is_auth()); ceph_assert(dest != mds->get_nodeid()); + if (!mds->is_stopping() && !dir->inode->is_exportable(dest)) { + dout(25) << "dir is export pinned" << dendl; + return; + } + if (!(mds->is_active() || mds->is_stopping())) { dout(7) << "i'm not active, no exports for now" << dendl; return; @@ -805,11 +810,6 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest) dout(7) << "i won't export anything in stray" << dendl; return; } - } else { - if (!mds->is_stopping() && !dir->inode->is_exportable(dest)) { - dout(7) << "dir is export pinned" << dendl; - return; - } } if (dir->is_frozen() || -- 2.47.3