block: merge struct block_device and struct hd_struct
authorChristoph Hellwig <hch@lst.de>
Fri, 27 Nov 2020 15:43:51 +0000 (16:43 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Dec 2020 21:53:40 +0000 (14:53 -0700)
commit0d02129e76edf91cf04fabf1efbc3a9a1f1d729a
tree20fd7e1e54d4430038eb74d8e276decee65ee7c3
parent9499ffc7521742e3fea32f6ac6c1213b6fc4e914
block: merge struct block_device and struct hd_struct

Instead of having two structures that represent each block device with
different life time rules, merge them into a single one.  This also
greatly simplifies the reference counting rules, as we can use the inode
reference count as the main reference count for the new struct
block_device, with the device model reference front ending it for device
model interaction.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c
block/blk.h
block/genhd.c
block/partitions/core.c
fs/block_dev.c
include/linux/blk_types.h
include/linux/blkdev.h
include/linux/genhd.h
init/do_mounts.c
kernel/trace/blktrace.c