]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: wait auth pinned objects when deactivating mds
authorYan, Zheng <zyan@redhat.com>
Mon, 10 Jul 2017 11:20:14 +0000 (19:20 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 10 Jul 2017 11:39:38 +0000 (19:39 +0800)
It is possible that mdsdir and stray directroies are auth pinned.
(they have unstable lock or they are being stored)

Fixes: http://tracker.ceph.com/issues/20537
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/MDCache.cc

index 84f80027232437cc039e486e785a1f13e8c0ffa2..3e079e716350a5eca77ccba28283f46fbeb5feb1 100644 (file)
@@ -7627,6 +7627,11 @@ bool MDCache::shutdown_pass()
   assert(!migrator->is_exporting());
   assert(!migrator->is_importing());
 
+  if ((myin && myin->is_auth_pinned()) ||
+      (mydir && mydir->is_auth_pinned())) {
+    dout(7) << "still have auth pinned objects" << dendl;
+    return false;
+  }
 
   // flush what we can from the log
   mds->mdlog->trim(0);