Hi,
On Sun, Feb 04, 2001 at 06:54:58PM +0530, [email protected] wrote:
>
> Can't we define a kiobuf structure as just this ? A combination of a
> frag_list and a page_list ?
Then all code which needs to accept an arbitrary kiobuf needs to be
able to parse both --- ugh.
> BTW, We could have a higher level io container that includes a <status>
> field and a <wait_queue_head> to take care of i/o completion
IO completion requirements are much more complex. Think of disk
readahead: we can create a single request struct for an IO of a
hundred buffer heads, and as the device driver satisfies that request,
it wakes up the buffer heads as it goes. There is a separete
completion notification for every single buffer head in the chain.
It's the very essence of readahead that we wake up the earlier buffers
as soon as they become available, without waiting for the later ones
to complete, so we _need_ this multiple completion concept.
Which is exactly why we have one kiobuf per higher-level buffer, and
we chain together kiobufs when we need to for a long request, but we
still get the independent completion notifiers.
Cheers,
Stephen