block: add a mark_dead holder operation

Add a mark_dead method to blk_holder_ops that is called from blk_mark_disk_dead
to notify the holder that the block device it is using has been marked dead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Christian Brauner <brauner@kernel.org>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Link: https://lore.kernel.org/r/20230601094459.1350643-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig
2023-06-01 11:44:53 +02:00
committed by Jens Axboe
parent 0718afd47f
commit f55e017c64
2 changed files with 25 additions and 0 deletions

View File

@@ -1471,6 +1471,7 @@ void blkdev_show(struct seq_file *seqf, off_t offset);
#endif
struct blk_holder_ops {
void (*mark_dead)(struct block_device *bdev);
};
struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, void *holder,