From: Rishabh Dave Date: Thu, 7 Mar 2019 05:00:09 +0000 (+0530) Subject: mds: check earlier if directories are already exported X-Git-Tag: v12.2.13~225^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb37290433eaae83157469f1eb0f7ca44e94563c;p=ceph.git mds: check earlier if directories are already exported Signed-off-by: Rishabh Dave (cherry picked from commit 46fb90734f371b5467d81cae25c06f8a487a3041) --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 85f6b3b726e..27da586cd4c 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -796,6 +796,11 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest) assert(dir->is_auth()); 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; @@ -824,11 +829,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() ||