lkml.org 
[lkml]   [2014]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bug_ON with patch: bio: modify __bio_add_page() to accept pages that don't start a new segment
Hi,

On 07/15/2014 10:44 AM, Maurizio Lombardi wrote:
>> I have reverted it yesterday in my tree.
>>
>
>
> The problem was here:
>
> if (q->merge_bvec_fn) {
> struct bvec_merge_data bvm = {
> .bi_bdev = bio->bi_bdev,
> .bi_sector = bio->bi_iter.bi_sector,
> .bi_size = bio->bi_iter.bi_size, <-------
> .bi_rw = bio->bi_rw,
> };
>
> /*
> * merge_bvec_fn() returns number of bytes it can accept
> * at this offset
> */
> if (q->merge_bvec_fn(q, &bvm, bvec) < bvec->bv_len)
> goto failed;
> }
>
> /* If we may be able to merge these biovecs, force a recount */
> if (bio->bi_vcnt > 1 && (BIOVEC_PHYS_MERGEABLE(bvec-1, bvec)))
> bio->bi_flags &= ~(1 << BIO_SEG_VALID);
>
>
> it should have been ".bi_size = bio->bi_iter.bi_size - len"
>

Jens, will you restore the patch in your tree if I submit
this fix?

Thanks,
Maurizio Lombardi


\
 
 \ /
  Last update: 2014-07-16 09:41    [W:0.487 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site