[Ocfs2-tools-devel] [PATCH 7/9] fsck.ocfs2: Fix feature bits, handle bad first journal.
Joel Becker
Joel.Becker at oracle.com
Tue Oct 14 18:33:05 PDT 2008
On Tue, Oct 14, 2008 at 06:17:21PM -0700, Mark Fasheh wrote:
> On Tue, Sep 09, 2008 at 05:57:14PM -0700, Joel Becker wrote:
> > fsck.ocfs2 needs to make the feature bits consistent across all
> > journals.
> >
> > While we're there, we can fix the fact that fsck.ocfs2 implicitly trusts
> > the first journal file. If the first journal is corrupt, it exits and
> > refuses to repair the filesystem.
> >
> > Instead, we create a two-pass journal check scheme. In the first pass,
> > all journals are checked. If we can find a sane disposition from one of
> > them, we can then go about fixing all of them.
> >
> > Included in this patch is fixing journal superblock feature bits.
> >
> > Signed-off-by: Joel Becker <joel.becker at oracle.com>
>
> This is a major improvement in our handling of journal corruptions. The
> logic's a bit complicated, but I don't think that's really avoidable. I
> wonder though, if we have any journal corruption tests around? Anyway,
> clearly we want this, so:
>
> Signed-off-by: Mark Fasheh <mfasheh at suse.com>
> -Mark
I did a quick set of tests while doing this. I would copy off a
journal header, use bvi to mess up the feature bits or the size, then
put it back and run fsck. I didn't get every possible combination, but
the basic ones (one bad journal, one journal with invalid size|features,
all journals with an unsupported feature) tested out on x86.
Joel
--
Life's Little Instruction Book #347
"Never waste the oppourtunity to tell someone you love them."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list