]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: fix journal reformat failure in standbyreplay
authorJohn Spray <john.spray@redhat.com>
Thu, 17 Jul 2014 12:15:45 +0000 (13:15 +0100)
committerSage Weil <sage@redhat.com>
Fri, 25 Jul 2014 22:34:09 +0000 (15:34 -0700)
commitd3de69f8a531bd1c2e95596b3520ab1d4f2a04b6
treef25b53a345afec750741c1116b7bd7adc9e60fb0
parentc757fbdd7b90fd7b4ba5a6a114b8a67f17d39949
mds: fix journal reformat failure in standbyreplay

In the 0.82 release, standbyreplay MDS daemons would try
to reformat the jouranl if they saw an older version on
disk, where this should have only been done by the active
MDS for the rank.  Depending on timing, this could cause
fatal corruption of the journal.

This change handles the following cases:
* only do reformat if not in standbyreplay (else raise EAGAIN
to keep trying til an active mds reformats it)
* if journal header goes away while in standbyreplay then raise
EAGAIN (handle rewrite happening in background)
* if journal version is greater than the max supported, suicide

Fixes: #8811
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 5438500af8979fda32e61714ae40b71c7ffdfd15)
src/mds/MDLog.cc
src/osdc/Journaler.h