]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit - block/fops.c
block: pass a block_device and opf to bio_init
authorChristoph Hellwig <hch@lst.de>
Mon, 24 Jan 2022 09:11:06 +0000 (10:11 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Feb 2022 14:49:59 +0000 (07:49 -0700)
commit49add4966d79244013fce35f95c6833fae82b8b1
tree915dec99a236142c08e4b0ac94346f178d467987
parent07888c665b405b1cd3577ddebfeb74f4717a84c4
block: pass a block_device and opf to bio_init

Pass the block_device that we plan to use this bio for and the
operation to bio_init to optimize the assignment.  A NULL block_device
can be passed, both for the passthrough case on a raw request_queue and
to temporarily avoid refactoring some nasty code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220124091107.642561-19-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
26 files changed:
block/bio.c
block/blk-flush.c
block/blk-zoned.c
block/fops.c
drivers/block/floppy.c
drivers/block/zram/zram_drv.c
drivers/md/bcache/io.c
drivers/md/bcache/journal.c
drivers/md/bcache/movinggc.c
drivers/md/bcache/request.c
drivers/md/bcache/super.c
drivers/md/bcache/writeback.c
drivers/md/dm.c
drivers/md/md-multipath.c
drivers/md/md.c
drivers/md/raid5-cache.c
drivers/md/raid5-ppl.c
drivers/md/raid5.c
drivers/nvme/target/io-cmd-bdev.c
drivers/nvme/target/passthru.c
drivers/nvme/target/zns.c
fs/iomap/buffered-io.c
fs/xfs/xfs_bio_io.c
fs/xfs/xfs_log.c
fs/zonefs/super.c
include/linux/bio.h