Eric Sandeen 9b57988db9 [PATCH] jbd2: 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
..
2006-10-11 11:14:23 -07:00
2006-10-10 16:15:33 -07:00
2006-10-15 11:00:58 -07:00
2006-10-03 23:28:36 +02:00
2006-10-20 09:13:10 -04:00
2006-10-11 11:14:21 -07:00
2006-10-11 11:14:21 -07:00
2006-10-10 16:15:34 -07:00
2006-10-11 11:14:23 -07:00
2006-10-13 12:42:36 -05:00
2006-10-11 11:14:23 -07:00
2006-10-21 13:35:06 -07:00
2006-10-20 10:26:43 -07:00
2006-10-03 23:01:26 +02:00
2006-10-11 11:14:23 -07:00
2006-10-05 16:18:55 -07:00
2006-10-10 16:15:34 -07:00
2006-01-11 18:42:13 -08:00
2006-10-04 06:51:26 -06:00
2006-10-11 11:14:25 -07:00
2006-01-08 20:12:40 -08:00
2006-10-11 11:14:21 -07:00
2006-10-02 07:57:15 -07:00
2006-04-11 13:53:33 +02:00
2006-10-01 00:39:33 -07:00
2006-06-26 09:58:17 -07:00
2005-11-07 18:18:11 -08:00
2006-10-01 00:39:19 -07:00
2006-03-23 07:38:11 -08:00
2006-10-01 00:39:29 -07:00
2006-03-23 07:38:12 -08:00
2006-10-01 00:39:19 -07:00
2006-10-09 14:20:38 -07:00