mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
Linux 6.5 compat: use disk_check_media_change when it exists
When disk_check_media_change() exists, then define zfs_check_media_change() to simply call disk_check_media_change() on the bd_disk member of its argument. Since disk_check_media_change() is newer than when revalidate_disk was present in bops, we should be able to safely do this via a macro, instead of recreating a new implementation of the inline function that forces revalidation. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes #15101
This commit is contained in:
parent
6c2fc56916
commit
c0f075c06b
@ -347,6 +347,7 @@ zfs_check_media_change(struct block_device *bdev)
|
|||||||
#define vdev_bdev_reread_part(bdev) zfs_check_media_change(bdev)
|
#define vdev_bdev_reread_part(bdev) zfs_check_media_change(bdev)
|
||||||
#elif defined(HAVE_DISK_CHECK_MEDIA_CHANGE)
|
#elif defined(HAVE_DISK_CHECK_MEDIA_CHANGE)
|
||||||
#define vdev_bdev_reread_part(bdev) disk_check_media_change(bdev->bd_disk)
|
#define vdev_bdev_reread_part(bdev) disk_check_media_change(bdev->bd_disk)
|
||||||
|
#define zfs_check_media_change(bdev) disk_check_media_change(bdev->bd_disk)
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
* This is encountered if check_disk_change() and bdev_check_media_change()
|
* This is encountered if check_disk_change() and bdev_check_media_change()
|
||||||
|
Loading…
Reference in New Issue
Block a user