Re: [RFC] using writepage to start io

From: Chris Mason (mason@suse.com)
Date: Sat Jul 28 2001 - 11:25:31 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:38 EST