diff options
| author | Nick Piggin <[email protected]> | 2009-01-06 14:39:04 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-01-06 15:58:59 -0800 |
| commit | 31a12666d8f0c22235297e1c1575f82061480029 (patch) | |
| tree | 89106848d2072278cc9338b091ad059db460420f /include/linux/debugobjects.h | |
| parent | 38c8e6180939e5619140b2e9e479cb26029ff8b1 (diff) | |
mm: write_cache_pages cyclic fix
In write_cache_pages, scanned == 1 is supposed to mean that cyclic
writeback has circled through zero, thus we should not circle again.
However it gets set to 1 after the first successful pagevec lookup. This
leads to cases where not enough data gets written.
Counterexample: file with first 10 pages dirty, writeback_index == 5,
nr_to_write == 10. Then the 5 last pages will be found, and scanned will
be set to 1, after writing those out, we will not cycle back to get the
first 5.
Rework this logic, now we'll always cycle unless we started off from index
0. When cycling, only write out as far as 1 page before the start page
from the first cycle (so we don't write parts of the file twice).
Signed-off-by: Nick Piggin <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Dave Chinner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions