block: introduce holder ops
authorChristoph Hellwig <hch@lst.de>
Thu, 1 Jun 2023 09:44:52 +0000 (11:44 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Jun 2023 16:53:04 +0000 (10:53 -0600)
commit0718afd47f70cf46877c39c25d06b786e1a3f36c
treecfe87d979122314904b2f9639fcb0a62e40a028a
parent00080f7fb7a599c26523037b202fb945f3141811
block: introduce holder ops

Add a new blk_holder_ops structure, which is passed to blkdev_get_by_* and
installed in the block_device for exclusive claims.  It will be used to
allow the block layer to call back into the user of the block device for
thing like notification of a removed device or a device resize.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Link: https://lore.kernel.org/r/20230601094459.1350643-10-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
34 files changed:
block/bdev.c
block/fops.c
block/genhd.c
block/ioctl.c
drivers/block/drbd/drbd_nl.c
drivers/block/loop.c
drivers/block/pktcdvd.c
drivers/block/rnbd/rnbd-srv.c
drivers/block/xen-blkback/xenbus.c
drivers/block/zram/zram_drv.c
drivers/md/bcache/super.c
drivers/md/dm.c
drivers/md/md.c
drivers/mtd/devices/block2mtd.c
drivers/nvme/target/io-cmd-bdev.c
drivers/s390/block/dasd_genhd.c
drivers/target/target_core_iblock.c
drivers/target/target_core_pscsi.c
fs/btrfs/dev-replace.c
fs/btrfs/volumes.c
fs/erofs/super.c
fs/ext4/super.c
fs/f2fs/super.c
fs/jfs/jfs_logmgr.c
fs/nfs/blocklayout/dev.c
fs/nilfs2/super.c
fs/ocfs2/cluster/heartbeat.c
fs/reiserfs/journal.c
fs/super.c
fs/xfs/xfs_super.c
include/linux/blk_types.h
include/linux/blkdev.h
kernel/power/swap.c
mm/swapfile.c