]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: properly check auth subtree count in MDCache::shutdown_pass() 21593/head
authorYan, Zheng <zyan@redhat.com>
Mon, 23 Apr 2018 10:36:37 +0000 (18:36 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 23 Apr 2018 10:44:06 +0000 (18:44 +0800)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/23813
src/mds/MDCache.cc

index 6803eeadee2ff23714bf4ac173f0880091f8cb2a..71b2c84b4f2dbe351b26069b4601b164b96c89af 100644 (file)
@@ -7679,8 +7679,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<CDir*> ls;
     for (map<CDir*, set<CDir*> >::iterator it = subtrees.begin();
@@ -7699,6 +7698,8 @@ bool MDCache::shutdown_pass()
        ls.push_back(dir);
       }
     }
+
+    migrator->clear_export_queue();
     for (list<CDir*>::iterator p = ls.begin(); p != ls.end(); ++p) {
       CDir *dir = *p;
       mds_rank_t dest = dir->get_inode()->authority().first;