block: introduce bio helpers for converting to multipage bvec
authorMing Lei <ming.lei@redhat.com>
Mon, 18 Dec 2017 12:22:03 +0000 (20:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Jan 2018 16:18:00 +0000 (09:18 -0700)
commit86292abc5af206f64192a0b60da06fd604debdc0
tree7b66d61bb987c976f934316e4b316c0191afe426
parent9b25bd0368d562d1929059e8eb9de4102567b923
block: introduce bio helpers for converting to multipage bvec

The following helpers are introduced for converting current users of
direct access to bvec table, and prepares for supporting multipage bvec:

bio_pages_all()
bio_first_bvec_all()
bio_first_page_all()
bio_last_bvec_all()

All are named as bio_*_all() to following bio_for_each_segment_all(),
they can only be used on bio of !bio_flagged(bio, BIO_CLONED), that means
the whole bvec table is covered.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/bio.h