2020-10-18 20:06:18 +03:00
|
|
|
dnl #
|
2020-12-23 00:53:25 +03:00
|
|
|
dnl # 5.11 API change
|
|
|
|
dnl # revalidate_disk_size() has been removed entirely.
|
|
|
|
dnl #
|
2020-10-18 20:06:18 +03:00
|
|
|
dnl # 5.10 API change
|
|
|
|
dnl # revalidate_disk() was replaced by revalidate_disk_size()
|
|
|
|
dnl #
|
2020-12-23 00:53:25 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_REVALIDATE_DISK], [
|
|
|
|
|
2020-10-18 20:06:18 +03:00
|
|
|
ZFS_LINUX_TEST_SRC([revalidate_disk_size], [
|
2022-03-24 18:33:40 +03:00
|
|
|
#include <linux/blkdev.h>
|
2020-10-18 20:06:18 +03:00
|
|
|
], [
|
|
|
|
struct gendisk *disk = NULL;
|
|
|
|
(void) revalidate_disk_size(disk, false);
|
|
|
|
])
|
2020-12-23 00:53:25 +03:00
|
|
|
|
|
|
|
ZFS_LINUX_TEST_SRC([revalidate_disk], [
|
2022-03-24 18:33:40 +03:00
|
|
|
#include <linux/blkdev.h>
|
2020-12-23 00:53:25 +03:00
|
|
|
], [
|
|
|
|
struct gendisk *disk = NULL;
|
|
|
|
(void) revalidate_disk(disk);
|
|
|
|
])
|
2020-10-18 20:06:18 +03:00
|
|
|
])
|
|
|
|
|
2020-12-23 00:53:25 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_REVALIDATE_DISK], [
|
|
|
|
|
2020-10-18 20:06:18 +03:00
|
|
|
AC_MSG_CHECKING([whether revalidate_disk_size() is available])
|
|
|
|
ZFS_LINUX_TEST_RESULT_SYMBOL([revalidate_disk_size],
|
|
|
|
[revalidate_disk_size], [block/genhd.c], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_REVALIDATE_DISK_SIZE, 1,
|
2020-12-23 00:53:25 +03:00
|
|
|
[revalidate_disk_size() is available])
|
2020-10-18 20:06:18 +03:00
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
2020-12-23 00:53:25 +03:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether revalidate_disk() is available])
|
|
|
|
ZFS_LINUX_TEST_RESULT_SYMBOL([revalidate_disk],
|
|
|
|
[revalidate_disk], [block/genhd.c], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_REVALIDATE_DISK, 1,
|
|
|
|
[revalidate_disk() is available])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
2020-10-18 20:06:18 +03:00
|
|
|
])
|
|
|
|
])
|