Eric Sandeen 5b41d92437 ext4: implement writeback livelock avoidance using page tagging
This is analogous to Jan Kara's commit,
f446daaea9d4a420d16c606f755f3689dcb2d0ce
mm: implement writeback livelock avoidance using page tagging

but since we forked write_cache_pages, we need to reimplement
it there (and in ext4_da_writepages, since range_cyclic handling
was moved to there)

If you start a large buffered IO to a file, and then set
fsync after it, you'll find that fsync does not complete
until the other IO stops.

If you continue re-dirtying the file (say, putting dd
with conv=notrunc in a loop), when fsync finally completes
(after all IO is done), it reports via tracing that
it has written many more pages than the file contains;
in other words it has synced and re-synced pages in
the file multiple times.

This then leads to problems with our writeback_index
update, since it advances it by pages written, and
essentially sets writeback_index off the end of the
file...

With the following patch, we only sync as much as was
dirty at the time of the sync.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-10-27 21:30:13 -04:00
..
2010-06-16 18:05:05 +02:00
2010-08-09 16:48:53 -04:00
2010-09-17 12:30:31 -07:00
2010-08-18 01:01:33 -04:00
2010-05-19 22:41:57 -04:00
2010-08-05 14:23:45 -05:00
2010-08-09 16:48:45 -04:00
2010-08-18 01:09:01 -04:00
2010-09-07 13:42:41 +02:00
2010-08-18 06:21:10 -04:00
2010-08-09 16:48:17 -04:00
2010-08-09 16:48:16 -04:00
2010-08-09 16:47:49 -04:00
2010-08-18 01:09:01 -04:00
2010-08-14 00:24:24 +02:00
2010-08-09 16:47:31 -04:00
2010-08-18 01:09:01 -04:00
2010-01-26 22:22:26 -05:00
2010-08-09 16:48:00 -04:00
2010-08-18 01:09:01 -04:00
2010-08-18 01:09:01 -04:00
2010-08-18 08:35:48 -04:00
2010-05-11 17:43:58 +02:00
2010-08-18 08:35:48 -04:00
2010-08-18 08:35:46 -04:00
2010-08-18 08:35:48 -04:00
2010-10-27 21:30:11 -04:00
2010-03-08 16:55:37 +01:00
2010-05-21 18:31:17 -04:00
2010-08-18 08:35:48 -04:00
2010-08-18 08:35:47 -04:00
2010-06-10 19:08:34 +02:00
2010-08-18 08:35:48 -04:00
2010-03-12 15:52:32 -08:00
2010-08-09 16:48:44 -04:00
2010-08-18 08:35:48 -04:00
2010-08-09 16:47:43 -04:00