From 70e814cf60c533fe2e850e451a7607ed5ffe7ed9 Mon Sep 17 00:00:00 2001 From: Jianyu Li Date: Mon, 4 Sep 2017 18:03:30 +0800 Subject: [PATCH] Make standby-replay mds avoid initiating subtree export Signed-off-by: Jianyu Li (cherry picked from commit 790c34138fbdf995c72e558057b9e64c882b522b) --- src/mds/Migrator.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index ad32f6d34649b..f3d99792419ed 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -793,6 +793,10 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest) //ceph_abort(); return; } + if (!mds->is_active()) { + dout(7) << "i'm not active, no exports for now" << dendl; + return; + } if (!dir->inode->is_base() && dir->inode->get_projected_parent_dir()->inode->is_stray() && dir->inode->get_projected_parent_dir()->get_parent_dir()->ino() != MDS_INO_MDSDIR(dest)) { -- 2.39.5