From: Jianyu Li Date: Mon, 4 Sep 2017 13:49:26 +0000 (+0800) Subject: Make standby-replay mds not migrate empty subtree when trimming cache X-Git-Tag: v12.2.1~31^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a0693c8ca4ea54950d44e9b5b2da0219d46ea5a6;p=ceph.git Make standby-replay mds not migrate empty subtree when trimming cache Signed-off-by: Jianyu Li (cherry picked from commit 178ca58fec2d820f61724d223addac1c4fa67086) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e6600dbd4ea7..0cf77a3f8c1b 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -6522,7 +6522,7 @@ bool MDCache::trim(int max, int count) if (!diri->is_auth() && !diri->is_base() && dir->get_num_head_items() == 0) { if (dir->state_test(CDir::STATE_EXPORTING) || - dir->is_freezing() || dir->is_frozen()) + dir->is_freezing() || dir->is_frozen() || !mds->is_active()) continue; migrator->export_empty_import(dir);