Linux 5.16 compat: Added mapping for iov_iter_fault_in_readable
Linux decided to rename this for some reason. At some point, we should probably invert this mapping, but for now... Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Coleman Kane <ckane@colemankane.org> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12975
This commit is contained in:
parent
c31c1146b6
commit
70b7b1975d
|
@ -13,7 +13,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ADD_DISK], [
|
||||||
])
|
])
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_ADD_DISK], [
|
AC_DEFUN([ZFS_AC_KERNEL_ADD_DISK], [
|
||||||
AC_MSG_CHECKING([whether add_disk() returns int])
|
AC_MSG_CHECKING([whether add_disk() returns int])
|
||||||
ZFS_LINUX_TEST_RESULT([add_disk_ret],
|
ZFS_LINUX_TEST_RESULT([add_disk_ret],
|
||||||
|
|
|
@ -41,6 +41,17 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
||||||
error = iov_iter_fault_in_readable(&iter, size);
|
error = iov_iter_fault_in_readable(&iter, size);
|
||||||
])
|
])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([fault_in_iov_iter_readable], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/uio.h>
|
||||||
|
],[
|
||||||
|
struct iov_iter iter = { 0 };
|
||||||
|
size_t size = 512;
|
||||||
|
int error __attribute__ ((unused));
|
||||||
|
|
||||||
|
error = fault_in_iov_iter_readable(&iter, size);
|
||||||
|
])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([iov_iter_count], [
|
ZFS_LINUX_TEST_SRC([iov_iter_count], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/uio.h>
|
#include <linux/uio.h>
|
||||||
|
@ -122,10 +133,17 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_IOV_ITER_FAULT_IN_READABLE, 1,
|
AC_DEFINE(HAVE_IOV_ITER_FAULT_IN_READABLE, 1,
|
||||||
[iov_iter_fault_in_readable() is available])
|
[iov_iter_fault_in_readable() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_CHECKING([whether fault_in_iov_iter_readable() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([fault_in_iov_iter_readable], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_FAULT_IN_IOV_ITER_READABLE, 1,
|
||||||
|
[fault_in_iov_iter_readable() is available])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
enable_vfs_iov_iter="no"
|
enable_vfs_iov_iter="no"
|
||||||
])
|
])
|
||||||
|
])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether iov_iter_count() is available])
|
AC_MSG_CHECKING([whether iov_iter_count() is available])
|
||||||
ZFS_LINUX_TEST_RESULT([iov_iter_count], [
|
ZFS_LINUX_TEST_RESULT([iov_iter_count], [
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#if defined(HAVE_VFS_IOV_ITER) && defined(HAVE_FAULT_IN_IOV_ITER_READABLE)
|
||||||
|
#define iov_iter_fault_in_readable(a, b) fault_in_iov_iter_readable(a, b)
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct iovec iovec_t;
|
typedef struct iovec iovec_t;
|
||||||
|
|
||||||
typedef enum zfs_uio_rw {
|
typedef enum zfs_uio_rw {
|
||||||
|
|
Loading…
Reference in New Issue