tmp_suning_uos_patched/fs/jbd
Eric Sandeen f58a74dca8 [PATCH] jbd: journal_dirty_data re-check for unmapped buffers
When running several fsx's and other filesystem stress tests, we found
cases where an unmapped buffer was still being sent to submit_bh by the
ext3 dirty data journaling code.

I saw this happen in two ways, both related to another thread doing a
truncate which would unmap the buffer in question.

Either we would get into journal_dirty_data with a bh which was already
unmapped (although journal_dirty_data_fn had checked for this earlier, the
state was not locked at that point), or it would get unmapped in the middle
of journal_dirty_data when we dropped locks to call sync_dirty_buffer.

By re-checking for mapped state after we've acquired the bh state lock, we
should avoid these races.  If we find a buffer which is no longer mapped,
we essentially ignore it, because journal_unmap_buffer has already decided
that this buffer can go away.

I've also added tracepoints in these two cases, and made a couple other
tracepoint changes that I found useful in debugging this.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-28 11:30:51 -07:00
..
checkpoint.c [PATCH] ext3: More whitespace cleanups 2006-09-27 08:26:10 -07:00
commit.c fix file specification in comments 2006-10-03 23:01:26 +02:00
journal.c [PATCH] null dereference in fs/jbd/journal.c 2006-10-11 11:14:14 -07:00
Makefile
recovery.c [PATCH] JBD: Make journal_brelse_array() static 2006-09-29 09:18:03 -07:00
revoke.c [PATCH] ext3 and jbd cleanup: remove whitespace 2006-09-27 08:26:09 -07:00
transaction.c [PATCH] jbd: journal_dirty_data re-check for unmapped buffers 2006-10-28 11:30:51 -07:00