block: make the block holder code optional
Move the block holder code into a separate file as it is not in any way related to the other block_dev.c code, and add a new selectable config option for it so that we don't have to build it without any remapped drivers selected. The Kconfig symbol contains a _DEPRECATED suffix to match the comments added in commit 49731baa ("block: restore multiple bd_link_disk_holder() support"). Signed-off-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Mike Snitzer <snitzer@redhat.com> Link: https://lore.kernel.org/r/20210804094147.459763-2-hch@lst.de Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- block/Kconfig 4 additions, 0 deletionsblock/Kconfig
- block/Makefile 1 addition, 0 deletionsblock/Makefile
- block/holder.c 139 additions, 0 deletionsblock/holder.c
- drivers/md/Kconfig 2 additions, 0 deletionsdrivers/md/Kconfig
- drivers/md/bcache/Kconfig 1 addition, 0 deletionsdrivers/md/bcache/Kconfig
- fs/block_dev.c 1 addition, 143 deletionsfs/block_dev.c
- include/linux/blk_types.h 1 addition, 1 deletioninclude/linux/blk_types.h
- include/linux/genhd.h 2 additions, 2 deletionsinclude/linux/genhd.h
Please register or sign in to comment