diff options
author | Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> | 2008-10-18 20:27:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 08:52:37 -0700 |
commit | 885e353c7427db7b60692789741b34e605b0b69b (patch) | |
tree | 9b6787c07b02e7abd41a0db9575d799bcb5eaf3a /fs/pnode.c | |
parent | d1645e526a1e5842c9ac433d73419ba886676cf3 (diff) | |
download | linux-3.10-885e353c7427db7b60692789741b34e605b0b69b.tar.gz linux-3.10-885e353c7427db7b60692789741b34e605b0b69b.tar.bz2 linux-3.10-885e353c7427db7b60692789741b34e605b0b69b.zip |
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>
Diffstat (limited to 'fs/pnode.c')
0 files changed, 0 insertions, 0 deletions