Re: [PATCH] block: consider merge of segments when merge bio into rq

2017-09-20 Thread jianchao.wang
On 09/21/2017 09:29 AM, Christoph Hellwig wrote: > So the check change here looks good to me. > > I don't like like the duplicate code, can you look into sharing > the new segment checks between the two functions and the existing > instance in ll_merge_requests_fn by passing say two struct bio

Re: [PATCH] block: consider merge of segments when merge bio into rq

2017-09-20 Thread jianchao.wang
On 09/21/2017 09:29 AM, Christoph Hellwig wrote: > So the check change here looks good to me. > > I don't like like the duplicate code, can you look into sharing > the new segment checks between the two functions and the existing > instance in ll_merge_requests_fn by passing say two struct bio

Re: [PATCH] block: consider merge of segments when merge bio into rq

2017-09-20 Thread Christoph Hellwig
So the check change here looks good to me. I don't like like the duplicate code, can you look into sharing the new segment checks between the two functions and the existing instance in ll_merge_requests_fn by passing say two struct bio *bio1 and struct bio *bio2 pointer instead of using req->bio

[PATCH] block: consider merge of segments when merge bio into rq

2017-09-15 Thread Jianchao Wang
When account the nr_phys_segments during merging bios into rq, only consider segments merging in individual bio but not all the bios in a rq. This leads to the bigger nr_phys_segments of rq than the real one when the segments of bios in rq are contiguous and mergeable. The nr_phys_segments of rq