kernel-ark/fs/jbd2
Hidehiro Kawai 7ad7445f60 jbd2: 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 gets aborted, 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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-10-10 20:29:31 -04:00
..
checkpoint.c jbd2: fix error handling for checkpoint io 2008-10-10 20:29:13 -04:00
commit.c jbd2: don't dirty original metadata buffer on abort 2008-10-10 20:29:31 -04:00
journal.c jbd2: fix error handling for checkpoint io 2008-10-10 20:29:13 -04:00
Makefile
recovery.c jbd2: fix error handling for checkpoint io 2008-10-10 20:29:13 -04:00
revoke.c jdb2: replace remaining __FUNCTION__ occurrences 2008-04-17 10:38:59 -04:00
transaction.c lockdep: rename map_[acquire|release]() => lock_map_[acquire|release]() 2008-08-11 10:30:30 +02:00