]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - block/blk-zoned.c
block: replace bi_bdev with a gendisk pointer and partitions index
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Aug 2017 17:10:32 +0000 (19:10 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 23 Aug 2017 18:49:55 +0000 (12:49 -0600)
commit74d46992e0d9dee7f1f376de0d56d31614c8a17a
tree399c316bb960541135e557bc1765caeec6d00084
parentc2ee070fb00365d7841f6661dcdc7fbe6620bdf8
block: replace bi_bdev with a gendisk pointer and partitions index

This way we don't need a block_device structure to submit I/O.  The
block_device has different life time rules from the gendisk and
request_queue and is usually only available when the block device node
is open.  Other callers need to explicitly create one (e.g. the lightnvm
passthrough code, or the new nvme multipathing code).

For the actual I/O path all that we need is the gendisk, which exists
once per block device.  But given that the block layer also does
partition remapping we additionally need a partition index, which is
used for said remapping in generic_make_request.

Note that all the block drivers generally want request_queue or
sometimes the gendisk, so this removes a layer of indirection all
over the stack.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
99 files changed:
arch/powerpc/sysdev/axonram.c
block/bio-integrity.c
block/bio.c
block/blk-core.c
block/blk-flush.c
block/blk-lib.c
block/blk-merge.c
block/blk-zoned.c
drivers/block/brd.c
drivers/block/drbd/drbd_actlog.c
drivers/block/drbd/drbd_bitmap.c
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_receiver.c
drivers/block/drbd/drbd_req.c
drivers/block/drbd/drbd_worker.c
drivers/block/floppy.c
drivers/block/pktcdvd.c
drivers/block/xen-blkback/blkback.c
drivers/md/bcache/debug.c
drivers/md/bcache/io.c
drivers/md/bcache/journal.c
drivers/md/bcache/request.c
drivers/md/bcache/super.c
drivers/md/bcache/writeback.c
drivers/md/dm-bio-record.h
drivers/md/dm-bufio.c
drivers/md/dm-cache-target.c
drivers/md/dm-crypt.c
drivers/md/dm-delay.c
drivers/md/dm-era-target.c
drivers/md/dm-flakey.c
drivers/md/dm-integrity.c
drivers/md/dm-io.c
drivers/md/dm-linear.c
drivers/md/dm-log-writes.c
drivers/md/dm-mpath.c
drivers/md/dm-raid1.c
drivers/md/dm-snap.c
drivers/md/dm-stripe.c
drivers/md/dm-switch.c
drivers/md/dm-thin.c
drivers/md/dm-verity-target.c
drivers/md/dm-zoned-metadata.c
drivers/md/dm-zoned-target.c
drivers/md/dm.c
drivers/md/faulty.c
drivers/md/linear.c
drivers/md/md.c
drivers/md/md.h
drivers/md/multipath.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5-cache.c
drivers/md/raid5-ppl.c
drivers/md/raid5.c
drivers/nvdimm/nd.h
drivers/nvme/host/core.c
drivers/nvme/host/lightnvm.c
drivers/nvme/target/io-cmd.c
drivers/s390/block/dcssblk.c
drivers/s390/block/xpram.c
drivers/target/target_core_iblock.c
fs/block_dev.c
fs/btrfs/check-integrity.c
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/raid56.c
fs/btrfs/scrub.c
fs/btrfs/volumes.c
fs/buffer.c
fs/crypto/bio.c
fs/direct-io.c
fs/exofs/ore.c
fs/ext4/page-io.c
fs/ext4/readpage.c
fs/f2fs/data.c
fs/f2fs/segment.c
fs/gfs2/lops.c
fs/gfs2/meta_io.c
fs/gfs2/ops_fstype.c
fs/hfsplus/wrapper.c
fs/iomap.c
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_metapage.c
fs/mpage.c
fs/nfs/blocklayout/blocklayout.c
fs/nilfs2/segbuf.c
fs/ocfs2/cluster/heartbeat.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_buf.c
include/linux/bio.h
include/linux/blk_types.h
include/trace/events/bcache.h
include/trace/events/block.h
include/trace/events/f2fs.h
kernel/power/swap.c
kernel/trace/blktrace.c
mm/page_io.c