Re: [PATCH 13/17] md: raid1: use bio_segments_all()

2017-02-16 Thread Ming Lei
On Thu, Feb 16, 2017 at 9:34 PM, Johannes Thumshirn wrote: > On 02/16/2017 02:32 PM, Ming Lei wrote: >> On Thu, Feb 16, 2017 at 8:35 PM, Johannes Thumshirn >> wrote: >>> On 02/16/2017 12:45 PM, Ming Lei wrote: @@ -998,7 +998,8 @@ static void

Re: [PATCH 13/17] md: raid1: use bio_segments_all()

2017-02-16 Thread Johannes Thumshirn
On 02/16/2017 02:32 PM, Ming Lei wrote: > On Thu, Feb 16, 2017 at 8:35 PM, Johannes Thumshirn > wrote: >> On 02/16/2017 12:45 PM, Ming Lei wrote: >>> @@ -998,7 +998,8 @@ static void alloc_behind_pages(struct bio *bio, struct >>> r1bio *r1_bio) >>> { >>> int i; >>>

Re: [PATCH 13/17] md: raid1: use bio_segments_all()

2017-02-16 Thread Ming Lei
On Thu, Feb 16, 2017 at 8:35 PM, Johannes Thumshirn wrote: > On 02/16/2017 12:45 PM, Ming Lei wrote: >> @@ -998,7 +998,8 @@ static void alloc_behind_pages(struct bio *bio, struct >> r1bio *r1_bio) >> { >> int i; >> struct bio_vec *bvec; >> - struct bio_vec

Re: [PATCH 13/17] md: raid1: use bio_segments_all()

2017-02-16 Thread Johannes Thumshirn
On 02/16/2017 12:45 PM, Ming Lei wrote: > @@ -998,7 +998,8 @@ static void alloc_behind_pages(struct bio *bio, struct > r1bio *r1_bio) > { > int i; > struct bio_vec *bvec; > - struct bio_vec *bvecs = kzalloc(bio->bi_vcnt * sizeof(struct bio_vec), > + unsigned vcnt =