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>
Showing
- block/blk-cgroup.c 4 additions, 4 deletionsblock/blk-cgroup.c
- block/blk.h 1 addition, 1 deletionblock/blk.h
- block/genhd.c 26 additions, 64 deletionsblock/genhd.c
- block/partitions/core.c 44 additions, 72 deletionsblock/partitions/core.c
- fs/block_dev.c 0 additions, 9 deletionsfs/block_dev.c
- include/linux/blk_types.h 6 additions, 2 deletionsinclude/linux/blk_types.h
- include/linux/blkdev.h 0 additions, 1 deletioninclude/linux/blkdev.h
- include/linux/genhd.h 9 additions, 31 deletionsinclude/linux/genhd.h
- init/do_mounts.c 10 additions, 11 deletionsinit/do_mounts.c
- kernel/trace/blktrace.c 8 additions, 35 deletionskernel/trace/blktrace.c
Loading
Please register or sign in to comment