From 26cd040d4beb5db24635fbb09233ace6917ad487 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 23 Apr 2018 18:36:37 +0800 Subject: [PATCH] mds: properly check auth subtree count in MDCache::shutdown_pass() Signed-off-by: "Yan, Zheng" Fixes: http://tracker.ceph.com/issues/23813 (cherry picked from commit cb60472bd2803878c04dbb961fd7f7f54707f25b) --- src/mds/MDCache.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e954c8912a5..5c69a29301f 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -7532,8 +7532,7 @@ bool MDCache::shutdown_pass() // SUBTREES int num_auth_subtree = 0; if (!subtrees.empty() && - mds->get_nodeid() != 0 && - migrator->get_export_queue_size() == 0) { + mds->get_nodeid() != 0) { dout(7) << "looking for subtrees to export to mds0" << dendl; list ls; for (map >::iterator it = subtrees.begin(); @@ -7552,6 +7551,8 @@ bool MDCache::shutdown_pass() ls.push_back(dir); } } + + migrator->clear_export_queue(); for (list::iterator p = ls.begin(); p != ls.end(); ++p) { CDir *dir = *p; mds_rank_t dest = dir->get_inode()->authority().first; -- 2.47.3