From 2b98f4701e9a12e50f8d017c93e5101eb02f7992 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 10 Jul 2017 19:20:14 +0800 Subject: [PATCH] mds: wait auth pinned objects when deactivating mds 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" --- src/mds/MDCache.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 84f80027232..3e079e71635 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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); -- 2.39.5