]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix MDLog recovery rare case 9697/head
authorJohn Spray <john.spray@redhat.com>
Tue, 14 Jun 2016 16:16:24 +0000 (17:16 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 14 Jun 2016 16:21:31 +0000 (17:21 +0100)
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 <john.spray@redhat.com>
src/mds/MDLog.cc

index 795ffb3f5b29175d95c8207adf183a6775cae634..e4999a4b90aa4c52bd445b9f153a83df9cd8327c 100644 (file)
@@ -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;
     }