]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: properly check auth subtree count in MDCache::shutdown_pass() 21844/head
authorYan, Zheng <zyan@redhat.com>
Mon, 23 Apr 2018 10:36:37 +0000 (18:36 +0800)
committerPrashant D <pdhange@redhat.com>
Mon, 7 May 2018 04:04:22 +0000 (00:04 -0400)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/23813
(cherry picked from commit cb60472bd2803878c04dbb961fd7f7f54707f25b)

src/mds/MDCache.cc

index e954c8912a57fbc6c470ff20d3626dac6556e3c7..5c69a29301ffa05c7f582fb361759851984899f2 100644 (file)
@@ -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<CDir*> ls;
     for (map<CDir*, set<CDir*> >::iterator it = subtrees.begin();
@@ -7552,6 +7551,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;