summaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2019-02-27 20:40:10 +0800
committerJens Axboe <axboe@kernel.dk>2019-02-27 06:18:52 -0700
commit4d633062c1c0794a6b3836b7b55afba4599736e8 (patch)
tree548fd74a24fae2181f63fdde531ff63cc953d6c5 /block/blk-merge.c
parent81214bab582eeda068e7904d57b6a3095e8f3855 (diff)
downloadlinux-4d633062c1c0794a6b3836b7b55afba4599736e8.tar.bz2
block: introduce bvec_nth_page()
Single-page bvec can often be seen in small BS workloads, so introduce bvec_nth_page() for avoiding to call nth_page() unnecessarily, which looks not cheap. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 066b66430523..c7e8a8273460 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -483,7 +483,7 @@ static unsigned blk_bvec_map_sg(struct request_queue *q,
offset = (total + bvec->bv_offset) % PAGE_SIZE;
idx = (total + bvec->bv_offset) / PAGE_SIZE;
- pg = nth_page(bvec->bv_page, idx);
+ pg = bvec_nth_page(bvec->bv_page, idx);
sg_set_page(*sg, pg, seg_size, offset);