lkml.org 
[lkml]   [2004]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix small highmem bio bounce bvec handling glitch
On Thu, Feb 26 2004, Christophe Saout wrote:
> Am Do, den 26.02.2004 schrieb Jens Axboe um 16:10:
>
> > > --- linux.orig/mm/highmem.c 2004-01-21 19:08:45.000000000 +0100
> > > +++ linux/mm/highmem.c 2004-02-26 15:47:14.574722576 +0100
> > > @@ -294,7 +294,12 @@
> > > if (tovec->bv_page == fromvec->bv_page)
> > > continue;
> > >
> > > - vfrom = page_address(fromvec->bv_page) + fromvec->bv_offset;
> > > + /*
> > > + * fromvec->bv_offset and fromvec->bv_len might have been
> > > + * modified by the block layer, so use the original copy,
> > > + * bounce_copy_vec already uses tovec->bv_len
> > > + */
> > > + vfrom = page_address(fromvec->bv_page) + tovec->bv_offset;
> > >
> > > bounce_copy_vec(tovec, vfrom);
> >
> > Irk yes, that's is pretty nasty, I really wish we could avoid screwing
> > with vec entries
>
> What about a bio->bi_bvec_done field?

That'd work. Suparna originally suggested bio->bi_voffset (iirc) as a
current offset. It just doesn't feel completely right...

> > (it's pretty obscure for bio clones, too)...
>
> Yes, I noticed that dm-crypt also does the same mistake for reads. I'm
> going to change it too (easily accomplished).

Great.

--
Jens Axboe

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.078 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site