Re: [RFC] using writepage to start io

Chris Mason
2001-07-28T16:26:43Z

On Saturday, July 28, 2001 12:18:02 PM -0400 Alexander Viro <viro@math.psu.edu> wrote:

>
>
> On Sat, 28 Jul 2001, Chris Mason wrote:
>
>>
>> Hello everyone,
>>
>> This is an rfc only, as the code has only been _lightly_ tested. I'll
>> do more tests/benchmarks next week.
>>
>> This patch changes fs/buffer.c to use writepage to start i/o,
>> instead of writing buffers directly. It also changes refile_buffer
>> to mark the page dirty when marking buffers dirty.
>
> ->writepage() unlocks the page upon completion. How do you deal with that?

writepage funcs are added for use by anonymous pages, and
flush_dirty_buffers and friends are changed to expect writepage to unlock
the page on completion.

Also, end_buffer_io_async is changed to only mark the page up to date
when all the buffers on it are up to date. This is important when
blocksize is less than the page size, and block_prepare_write/
block_commit_write are used to dirty a buffer in the middle of a
non-up to date page. If that dirty buffer is written with an
async end_io handler, we don't want the whole page set up to date
by the handler.

-chris