]> git-server-git.apps.pok.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)
committerJohn Spray <john.spray@redhat.com>
Fri, 18 Jul 2014 17:40:51 +0000 (18:40 +0100)
commit5438500af8979fda32e61714ae40b71c7ffdfd15
tree743631f52d47ce08e1b368a413c9b6db3f1be64e
parented3bc4c385a227895cd4d487960d374ee4e60f2d
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>
src/mds/MDLog.cc
src/osdc/Journaler.h