Re: patch: aio + bio for raw io

From: Suparna Bhattacharya (suparna@in.ibm.com)
Date: Mon Feb 11 2002 - 13:11:27 EST


On Fri, Feb 08, 2002 at 05:02:57PM -0500, Benjamin LaHaise wrote:
> On Fri, Feb 08, 2002 at 03:10:09PM +0530, Suparna Bhattacharya wrote:
> > You chose to add a kvec_cb field to the bio structure rather than use
> > bi_private ?
>
> Yup. I'm lazy. Also, the cb struct actually needs 2 pointers, so just
> bi_private isn't enough.
>
> > For the raw path, you are OK since you never have to copy data out of
> > the kvecs after i/o completion, and unmap_kvec only looks at veclet pages.
> > So the fact block can change the offset and len fields in the veclets
> > doesn't affect you, but thought I'd mention it as a point of caution
> > anyhow ...
>
> Ugh. That sounds like something bio should not be doing. If someone
> wants to fix it, such a patch would be much appreciated, otherwise it'll
> wait until I'm back in Canada.

I had posted a suggestion on lkml earlier about this problem and one way
to fix this - at that time I was thinking of bio->bi_voffset field (the
thought was that it could even be useful for cloning/splitting), and
was waiting for a decision from Jens about it.
(Your kvec_dst is another way :))

However I'm now wondering if the rq->hard_cur_sectors can be used to
achieve a similar effect (won't help with splitting, but might suffice
for the request transfer, without requiring new bio fields).

>
> -ben

------------------------------------------



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:38 EST