Re: [PATCH v2 16/51] block: bounce: avoid direct access to bvec table

2017-06-27 Thread Ming Lei
On Mon, Jun 26, 2017 at 11:12:11PM -0700, Matthew Wilcox wrote: > On Mon, Jun 26, 2017 at 08:09:59PM +0800, Ming Lei wrote: > > bio_for_each_segment_all(bvec, bio, i) { > > - org_vec = bio_orig->bi_io_vec + i + start; > > - > > - if (bvec->bv_page == org_vec->bv_page) > > -

Re: [PATCH v2 16/51] block: bounce: avoid direct access to bvec table

2017-06-26 Thread Matthew Wilcox
On Mon, Jun 26, 2017 at 08:09:59PM +0800, Ming Lei wrote: > bio_for_each_segment_all(bvec, bio, i) { > - org_vec = bio_orig->bi_io_vec + i + start; > - > - if (bvec->bv_page == org_vec->bv_page) > - continue; > + orig_vec = bio_iter_iove

[PATCH v2 16/51] block: bounce: avoid direct access to bvec table

2017-06-26 Thread Ming Lei
We will support multipage bvecs in the future, so change to iterator way for getting bv_page of bvec from original bio. Signed-off-by: Ming Lei --- block/bounce.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/block/bounce.c b/block/bounce.c index 916ee9a9a216.