mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Removing old code outside of 4.18 kernsls
There were checks still in place to verify we could completely use iov_iter's on the Linux side. All interfaces are available as of kernel 4.18, so there is no reason to check whether we should use that interface at this point. This PR completely removes the UIO_USERSPACE type. It also removes the check for the direct_IO interface checks. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Brian Atkinson <batkinson@lanl.gov> Closes #16856
This commit is contained in:
committed by
Brian Behlendorf
parent
b57f53036d
commit
1862c1c0a8
@@ -1,57 +0,0 @@
|
||||
dnl #
|
||||
dnl # Check for Direct I/O interfaces.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
||||
ZFS_LINUX_TEST_SRC([direct_io_iter], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
static ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||
struct iov_iter *iter) { return 0; }
|
||||
|
||||
static const struct address_space_operations
|
||||
aops __attribute__ ((unused)) = {
|
||||
.direct_IO = test_direct_IO,
|
||||
};
|
||||
],[])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
static ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||
struct iov_iter *iter, loff_t offset) { return 0; }
|
||||
|
||||
static const struct address_space_operations
|
||||
aops __attribute__ ((unused)) = {
|
||||
.direct_IO = test_direct_IO,
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_VFS_DIRECT_IO], [
|
||||
dnl #
|
||||
dnl # Linux 4.6.x API change
|
||||
dnl #
|
||||
AC_MSG_CHECKING([whether aops->direct_IO() uses iov_iter])
|
||||
ZFS_LINUX_TEST_RESULT([direct_io_iter], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_VFS_DIRECT_IO_ITER, 1,
|
||||
[aops->direct_IO() uses iov_iter without rw])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
dnl #
|
||||
dnl # Linux 4.1.x API change
|
||||
dnl #
|
||||
AC_MSG_CHECKING(
|
||||
[whether aops->direct_IO() uses offset])
|
||||
ZFS_LINUX_TEST_RESULT([direct_io_iter_offset], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_VFS_DIRECT_IO_ITER_OFFSET, 1,
|
||||
[aops->direct_IO() uses iov_iter with offset])
|
||||
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
ZFS_LINUX_TEST_ERROR([Direct I/O])
|
||||
])
|
||||
])
|
||||
])
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iov_iter_get_pages2], [
|
||||
#include <linux/uio.h>
|
||||
], [
|
||||
],[
|
||||
struct iov_iter iter = { 0 };
|
||||
struct page **pages = NULL;
|
||||
size_t maxsize = 4096;
|
||||
@@ -27,20 +27,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
||||
&start);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iov_iter_get_pages], [
|
||||
#include <linux/uio.h>
|
||||
], [
|
||||
struct iov_iter iter = { 0 };
|
||||
struct page **pages = NULL;
|
||||
size_t maxsize = 4096;
|
||||
unsigned maxpages = 1;
|
||||
size_t start;
|
||||
size_t ret __attribute__ ((unused));
|
||||
|
||||
ret = iov_iter_get_pages(&iter, pages, maxsize, maxpages,
|
||||
&start);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iov_iter_type], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
@@ -59,7 +45,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||
enable_vfs_iov_iter="yes"
|
||||
|
||||
AC_MSG_CHECKING([whether fault_in_iov_iter_readable() is available])
|
||||
ZFS_LINUX_TEST_RESULT([fault_in_iov_iter_readable], [
|
||||
@@ -78,17 +63,8 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IOV_ITER_GET_PAGES2, 1,
|
||||
[iov_iter_get_pages2() is available])
|
||||
], [
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([whether iov_iter_get_pages() is available])
|
||||
ZFS_LINUX_TEST_RESULT([iov_iter_get_pages], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_IOV_ITER_GET_PAGES, 1,
|
||||
[iov_iter_get_pages() is available])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
enable_vfs_iov_iter="no"
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
@@ -105,17 +81,6 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # As of the 4.9 kernel support is provided for iovecs, kvecs,
|
||||
dnl # bvecs and pipes in the iov_iter structure. As long as the
|
||||
dnl # other support interfaces are all available the iov_iter can
|
||||
dnl # be correctly used in the uio structure.
|
||||
dnl #
|
||||
AS_IF([test "x$enable_vfs_iov_iter" = "xyes"], [
|
||||
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
|
||||
|
||||
@@ -79,7 +79,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_VFS_READ_FOLIO
|
||||
ZFS_AC_KERNEL_SRC_VFS_MIGRATE_FOLIO
|
||||
ZFS_AC_KERNEL_SRC_VFS_FSYNC_2ARGS
|
||||
ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO
|
||||
ZFS_AC_KERNEL_SRC_VFS_READPAGES
|
||||
ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||
ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
|
||||
@@ -190,7 +189,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_VFS_READ_FOLIO
|
||||
ZFS_AC_KERNEL_VFS_MIGRATE_FOLIO
|
||||
ZFS_AC_KERNEL_VFS_FSYNC_2ARGS
|
||||
ZFS_AC_KERNEL_VFS_DIRECT_IO
|
||||
ZFS_AC_KERNEL_VFS_READPAGES
|
||||
ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||
ZFS_AC_KERNEL_VFS_IOV_ITER
|
||||
|
||||
Reference in New Issue
Block a user