aboutsummaryrefslogtreecommitdiffstats
path: root/config/kernel-vfs-iov_iter.m4
diff options
context:
space:
mode:
authorColeman Kane <[email protected]>2023-07-23 01:34:29 -0400
committerBrian Behlendorf <[email protected]>2023-09-19 08:50:01 -0700
commit0bf2c5365ed3afa65545393d8da2317699f18b30 (patch)
tree4b7ba9914444cacc66d6695c9819b793cb9ec082 /config/kernel-vfs-iov_iter.m4
parentd76de9fb170d58f81edac5729c365fc3fd60a22f (diff)
Linux 6.4 compat: iter_iov() function now used to get old iov member
The iov_iter->iov member is now iov_iter->__iov and must be accessed via the accessor function iter_iov(). Create a wrapper that is conditionally compiled to use the access method appropriate for the target kernel version. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #15100
Diffstat (limited to 'config/kernel-vfs-iov_iter.m4')
-rw-r--r--config/kernel-vfs-iov_iter.m423
1 files changed, 23 insertions, 0 deletions
diff --git a/config/kernel-vfs-iov_iter.m4 b/config/kernel-vfs-iov_iter.m4
index e0617faab..cc5a7ab0c 100644
--- a/config/kernel-vfs-iov_iter.m4
+++ b/config/kernel-vfs-iov_iter.m4
@@ -93,6 +93,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
struct iov_iter iter = { 0 };
__attribute__((unused)) enum iter_type i = iov_iter_type(&iter);
])
+
+ ZFS_LINUX_TEST_SRC([iter_iov], [
+ #include <linux/fs.h>
+ #include <linux/uio.h>
+ ],[
+ struct iov_iter iter = { 0 };
+ __attribute__((unused)) const struct iovec *iov = iter_iov(&iter);
+ ])
])
AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
@@ -201,4 +209,19 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
AC_DEFINE(HAVE_VFS_IOV_ITER, 1,
[All required iov_iter interfaces are available])
])
+
+ dnl #
+ dnl # Kernel 6.5 introduces the iter_iov() function that returns the
+ dnl # __iov member of an iov_iter*. The iov member was renamed to this
+ dnl # __iov member, and is intended to be accessed via the helper
+ dnl # function now.
+ dnl #
+ AC_MSG_CHECKING([whether iter_iov() is available])
+ ZFS_LINUX_TEST_RESULT([iter_iov], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ITER_IOV, 1,
+ [iter_iov() is available])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
])