linux/fs/jbd
Hidehiro Kawai 885e353c74 jbd: don't dirty original metadata buffer on abort
Currently, original metadata buffers are dirtied when they are unfiled
whether the journal has aborted or not.  Eventually these buffers will be
written-back to the filesystem by pdflush.  This means some metadata
buffers are written to the filesystem without journaling if the journal
aborts.  So if both journal abort and system crash happen at the same
time, the filesystem would become inconsistent state.  Additionally,
replaying journaled metadata can overwrite the latest metadata on the
filesystem partly.  Because, if the journal aborts, journaled metadata are
preserved and replayed during the next mount not to lose uncheckpointed
metadata.  This would also break the consistency of the filesystem.

This patch prevents original metadata buffers from being dirtied on abort
by clearing BH_JBDDirty flag from those buffers.  Thus, no metadata
buffers are written to the filesystem without journaling.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:37 -07:00
..
checkpoint.c spinlock: lockbreak cleanup 2008-01-30 13:31:20 +01:00
commit.c jbd: don't dirty original metadata buffer on abort 2008-10-20 08:52:37 -07:00
journal.c jbd: unexport journal_update_superblock 2008-07-25 10:53:32 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
recovery.c jbd: correctly unescape journal data blocks 2008-03-19 18:53:36 -07:00
revoke.c jbd: tidy up revoke cache initialisation and destruction 2008-07-25 10:53:32 -07:00
transaction.c lockdep: rename map_[acquire|release]() => lock_map_[acquire|release]() 2008-08-11 10:30:30 +02:00