block: bio: pass bvec table to bio_init()
Some drivers often use external bvec table, so introduce this helper for this case. It is always safe to access the bio->bi_io_vec in this way for this case. After converting to this usage, it will becomes a bit easier to evaluate the remaining direct access to bio->bi_io_vec, so it can help to prepare for the following multipage bvec support. Signed-off-by:Ming Lei <tom.leiming@gmail.com> Reviewed-by:
Christoph Hellwig <hch@lst.de> Fixed up the new O_DIRECT cases. Signed-off-by:
Jens Axboe <axboe@fb.com>
Showing
- block/bio.c 6 additions, 2 deletionsblock/bio.c
- drivers/block/floppy.c 1 addition, 2 deletionsdrivers/block/floppy.c
- drivers/md/bcache/io.c 1 addition, 3 deletionsdrivers/md/bcache/io.c
- drivers/md/bcache/journal.c 1 addition, 3 deletionsdrivers/md/bcache/journal.c
- drivers/md/bcache/movinggc.c 2 additions, 4 deletionsdrivers/md/bcache/movinggc.c
- drivers/md/bcache/request.c 1 addition, 1 deletiondrivers/md/bcache/request.c
- drivers/md/bcache/super.c 3 additions, 9 deletionsdrivers/md/bcache/super.c
- drivers/md/bcache/writeback.c 2 additions, 3 deletionsdrivers/md/bcache/writeback.c
- drivers/md/dm-bufio.c 1 addition, 3 deletionsdrivers/md/dm-bufio.c
- drivers/md/dm.c 1 addition, 1 deletiondrivers/md/dm.c
- drivers/md/multipath.c 1 addition, 1 deletiondrivers/md/multipath.c
- drivers/md/raid5-cache.c 1 addition, 1 deletiondrivers/md/raid5-cache.c
- drivers/md/raid5.c 2 additions, 7 deletionsdrivers/md/raid5.c
- drivers/nvme/target/io-cmd.c 1 addition, 3 deletionsdrivers/nvme/target/io-cmd.c
- fs/block_dev.c 1 addition, 3 deletionsfs/block_dev.c
- fs/logfs/dev_bdev.c 1 addition, 3 deletionsfs/logfs/dev_bdev.c
- include/linux/bio.h 2 additions, 1 deletioninclude/linux/bio.h
Please register or sign in to comment