From: John Spray Date: Tue, 14 Jun 2016 16:16:24 +0000 (+0100) Subject: mds: fix MDLog recovery rare case X-Git-Tag: v11.0.0~181^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9697%2Fhead;p=ceph.git mds: fix MDLog recovery rare case This handled the case where one daemon saw a log that was partially rewritten by another. It was calling the context incorrectly (without mds_lock held) Fixes: http://tracker.ceph.com/issues/16298 Signed-off-by: John Spray --- diff --git a/src/mds/MDLog.cc b/src/mds/MDLog.cc index 795ffb3f5b29..e4999a4b90aa 100644 --- a/src/mds/MDLog.cc +++ b/src/mds/MDLog.cc @@ -924,6 +924,10 @@ void MDLog::_recovery_thread(MDSInternalContextBase *completion) if (mds->is_standby_replay()) { dout(1) << "Journal " << jp.front << " is being rewritten, " << "cannot replay in standby until an active MDS completes rewrite" << dendl; + Mutex::Locker l(mds->mds_lock); + if (mds->is_daemon_stopping()) { + return; + } completion->complete(-EAGAIN); return; }