]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix shutting down mds timed-out due to deadlock 10500/head
authorZhi Zhang <willzzhang@tencent.com>
Mon, 27 Jun 2016 05:00:26 +0000 (13:00 +0800)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Fri, 29 Jul 2016 11:45:54 +0000 (17:15 +0530)
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit ca069149654ecd10778cd5327bf59b9643e23967)

src/mds/MDSRank.cc

index 68ea33eb0b343873e8365ae5162b0f2974f7d388..9c5def15a94880f51c0347a59df604db7d546f67 100644 (file)
@@ -237,7 +237,11 @@ void MDSRankDispatcher::shutdown()
   progress_thread.shutdown();
 
   // shut down messenger
+  // release mds_lock first because messenger thread might call 
+  // MDSDaemon::ms_handle_reset which will try to hold mds_lock
+  mds_lock.Unlock();
   messenger->shutdown();
+  mds_lock.Lock();
 
   // Workaround unclean shutdown: HeartbeatMap will assert if
   // worker is not removed (as we do in ~MDS), but ~MDS is not