diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-11-24 18:58:13 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-12-02 17:46:55 +0100 |
commit | 22b56c2964386ddced252be407150b22f85e209e (patch) | |
tree | 563070603b7e598538b3e0a35aedf31a689dc229 /block | |
parent | block: optimise for_each_bvec() advance (diff) | |
download | linux-22b56c2964386ddced252be407150b22f85e209e.tar.xz linux-22b56c2964386ddced252be407150b22f85e209e.zip |
bio: optimise bvec iteration
__bio_for_each_bvec(), __bio_for_each_segment() and bio_copy_data_iter()
fall under conditions of bvec_iter_advance_single(), which is a faster
and slimmer version of bvec_iter_advance(). Add
bio_advance_iter_single() and convert them.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/bio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/bio.c b/block/bio.c index ebb18136b86f..1f2cc1fbe283 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1212,8 +1212,8 @@ void bio_copy_data_iter(struct bio *dst, struct bvec_iter *dst_iter, flush_dcache_page(dst_bv.bv_page); - bio_advance_iter(src, src_iter, bytes); - bio_advance_iter(dst, dst_iter, bytes); + bio_advance_iter_single(src, src_iter, bytes); + bio_advance_iter_single(dst, dst_iter, bytes); } } EXPORT_SYMBOL(bio_copy_data_iter); |