]> www.infradead.org Git - users/hch/block.git/commit
block: pass a block_device and opf to bio_alloc
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Jan 2022 07:03:28 +0000 (08:03 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Jan 2022 09:07:57 +0000 (10:07 +0100)
commitacc56ea56d725aa3724d94bccba1424b2b13f4d8
tree8bbdcf147c1c650cc7e5a3c941e5d68e2813d28d
parent69d79774f83cbf5364fed3ddf2af2fc1c73a4571
block: pass a block_device and opf to bio_alloc

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

Also move the gfp_mask argument after the nr_vecs argument for a much
more logical calling convention matching what most of the kernel does.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
42 files changed:
block/bio.c
block/fops.c
drivers/block/drbd/drbd_receiver.c
drivers/block/rnbd/rnbd-srv.c
drivers/block/xen-blkback/blkback.c
drivers/block/zram/zram_drv.c
drivers/md/dm-log-writes.c
drivers/md/dm-thin.c
drivers/md/dm-zoned-metadata.c
drivers/nvdimm/nd_virtio.c
drivers/nvme/target/io-cmd-bdev.c
drivers/nvme/target/passthru.c
drivers/nvme/target/zns.c
drivers/scsi/ufs/ufshpb.c
drivers/target/target_core_iblock.c
fs/btrfs/disk-io.c
fs/buffer.c
fs/crypto/bio.c
fs/direct-io.c
fs/erofs/zdata.c
fs/ext4/page-io.c
fs/ext4/readpage.c
fs/gfs2/lops.c
fs/gfs2/meta_io.c
fs/gfs2/ops_fstype.c
fs/hfsplus/wrapper.c
fs/iomap/buffered-io.c
fs/iomap/direct-io.c
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_metapage.c
fs/mpage.c
fs/nfs/blocklayout/blocklayout.c
fs/nilfs2/segbuf.c
fs/ntfs3/fsntfs.c
fs/ocfs2/cluster/heartbeat.c
fs/squashfs/block.c
fs/xfs/xfs_bio_io.c
fs/xfs/xfs_buf.c
fs/zonefs/super.c
include/linux/bio.h
kernel/power/swap.c
mm/page_io.c