2 dnl # Check for Direct I/O interfaces.
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
5 ZFS_LINUX_TEST_SRC([direct_io_iter], [
8 static ssize_t test_direct_IO(struct kiocb *kiocb,
9 struct iov_iter *iter) { return 0; }
11 static const struct address_space_operations
12 aops __attribute__ ((unused)) = {
13 .direct_IO = test_direct_IO,
17 ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [
20 static ssize_t test_direct_IO(struct kiocb *kiocb,
21 struct iov_iter *iter, loff_t offset) { return 0; }
23 static const struct address_space_operations
24 aops __attribute__ ((unused)) = {
25 .direct_IO = test_direct_IO,
30 AC_DEFUN([ZFS_AC_KERNEL_VFS_DIRECT_IO], [
32 dnl # Linux 4.6.x API change
34 AC_MSG_CHECKING([whether aops->direct_IO() uses iov_iter])
35 ZFS_LINUX_TEST_RESULT([direct_io_iter], [
37 AC_DEFINE(HAVE_VFS_DIRECT_IO_ITER, 1,
38 [aops->direct_IO() uses iov_iter without rw])
43 dnl # Linux 4.1.x API change
46 [whether aops->direct_IO() uses offset])
47 ZFS_LINUX_TEST_RESULT([direct_io_iter_offset], [
49 AC_DEFINE(HAVE_VFS_DIRECT_IO_ITER_OFFSET, 1,
50 [aops->direct_IO() uses iov_iter with offset])
54 ZFS_LINUX_TEST_ERROR([Direct I/O])