diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-04-11 23:14:52 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-11 23:14:52 -0700 |
| commit | bd134f2720aa6fe1544a76360999d8e18e5f3e02 (patch) | |
| tree | d80ceef5de58739effcf314a2c8b10fe6d89f302 /include/linux/writeback.h | |
| parent | d3eb546e203ab717237566e5762d97796e58f41f (diff) | |
[PATCH] don't allow background writes to hide dirty buffers
If pdflush hits a locked-and-clean buffer in __block_write_full_page() it
will just pass over the buffer. Typically the buffer is an ext3 data=ordered
buffer which is being written by kjournald, but a similar thing can happen
with blockdev buffers and ll_rw_block().
This is bad because the buffer is still under I/O and a subsequent fsync's
fdatawait() needs to know about it.
It is not practical to tag the page for writeback - only the submitter of the
I/O can do that, because the submitter has control of the end_io handler.
So instead, redirty the page so a subsequent fsync's fdatawrite() will wait on
the underway I/O.
There is a risk that pdflush::background_writeout() will lock up, repeatedly
trying and failing to write the same page. This is prevented by ensuring
that background_writeout() always throttles when it made no progress.
Diffstat (limited to 'include/linux/writeback.h')
| -rw-r--r-- | include/linux/writeback.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 1424811e1eab..7380d2cefb16 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -39,6 +39,7 @@ struct writeback_control { older than this */ long nr_to_write; /* Write this many pages, and decrement this for each page written */ + long pages_skipped; /* Pages which were not written */ int nonblocking; /* Don't get stuck on request queues */ int encountered_congestion; /* An output: a queue is full */ int for_kupdate; /* A kupdate writeback */ |
