]> git.baikalelectronics.ru Git - kernel.git/commit
block: pass a block_device and opf to bio_alloc
authorChristoph Hellwig <hch@lst.de>
Mon, 24 Jan 2022 09:11:05 +0000 (10:11 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Feb 2022 14:49:59 +0000 (07:49 -0700)
commit9f306c73e3828688bf9a4382ce865754bf811a8a
treefe3700fcd1b741ddd3caa84a184a8aaaf9e098d7
parent1531d9425aedc915af99b2dff113a41da2918fff
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>
Link: https://lore.kernel.org/r/20220124091107.642561-18-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
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