diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/kernel-blkdev.m4 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config/kernel-blkdev.m4 b/config/kernel-blkdev.m4 index 61e66421f..9c60e5dd4 100644 --- a/config/kernel-blkdev.m4 +++ b/config/kernel-blkdev.m4 @@ -294,6 +294,27 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE], [ ]) ]) +dnl # +dnl # 5.13 API change +dnl # blkdev_get_by_path() no longer handles ERESTARTSYS +dnl # +dnl # Unfortunately we're forced to rely solely on the kernel version +dnl # number in order to determine the expected behavior. This was an +dnl # internal change to blkdev_get_by_dev(), see commit a8ed1a0607. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS], [ + AC_MSG_CHECKING([whether blkdev_get_by_path() handles ERESTARTSYS]) + AS_VERSION_COMPARE([$LINUX_VERSION], [5.13.0], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BLKDEV_GET_ERESTARTSYS, 1, + [blkdev_get_by_path() handles ERESTARTSYS]) + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(no) + ]) +]) + AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [ ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH ZFS_AC_KERNEL_SRC_BLKDEV_PUT @@ -318,4 +339,5 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [ ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE ZFS_AC_KERNEL_BLKDEV_BDEV_CHECK_MEDIA_CHANGE ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE + ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS ]) |