Whamcloud - gitweb
e2fsck: mark sparse journal as invalid
authorEric Sandeen <sandeen@redhat.com>
Mon, 12 Apr 2010 22:36:33 +0000 (17:36 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 13 May 2010 17:14:41 +0000 (13:14 -0400)
commit5750e5f9246ead0bc2af7da0cb5bcdfc916cace6
treedb4b4588ebbd31d6564977fbde3a1d184ec70835
parenta6217f5ae2ca02f2f12c259b34615cbd7f4110d6
e2fsck: mark sparse journal as invalid

For a filesystem that fails with:

journal_bmap: journal block not found at offset 7334 on loop0
JBD: bad block at offset 7334

e2fsck won't actually fix this; it will mark the fs as clean,
so it will mount, but it does not fix that block, and when the
journal reaches this point again it will fail again.

The following simple change to process_journal_block() might be
a little drastic; it will clear & recreate the journal inode if
it's sparse - i.e. if it gets block 0.

I suppose we could be more complicated and try to replay the journal
up to the error, but I'm not sure it's worth it since we're fscking
it anyway.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/journal.c