diff options
author | Coleman Kane <[email protected]> | 2023-08-01 11:32:38 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2023-09-19 08:50:01 -0700 |
commit | c0f075c06b914b02e175f8de670b7b440630c7bc (patch) | |
tree | 42f2e9699462957630fa8f63179b8f15cc6eeec9 /include/os | |
parent | 6c2fc5691615e478d1360101b3ec22906e8ce7a8 (diff) |
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 <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes #15101
Diffstat (limited to 'include/os')
-rw-r--r-- | include/os/linux/kernel/linux/blkdev_compat.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h index e0f20ba32..1641dd92a 100644 --- a/include/os/linux/kernel/linux/blkdev_compat.h +++ b/include/os/linux/kernel/linux/blkdev_compat.h @@ -347,6 +347,7 @@ zfs_check_media_change(struct block_device *bdev) #define vdev_bdev_reread_part(bdev) zfs_check_media_change(bdev) #elif defined(HAVE_DISK_CHECK_MEDIA_CHANGE) #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 /* * This is encountered if check_disk_change() and bdev_check_media_change() |