4 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_RW_ITERATE], [
5 ZFS_LINUX_TEST_SRC([file_operations_rw], [
8 ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
10 ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
13 static const struct file_operations
14 fops __attribute__ ((unused)) = {
15 .read_iter = test_read,
16 .write_iter = test_write,
20 ZFS_LINUX_TEST_SRC([new_sync_rw], [
23 ssize_t ret __attribute__ ((unused));
24 struct file *filp = NULL;
25 char __user *rbuf = NULL;
26 const char __user *wbuf = NULL;
30 ret = new_sync_read(filp, rbuf, len, &ppos);
31 ret = new_sync_write(filp, wbuf, len, &ppos);
35 AC_DEFUN([ZFS_AC_KERNEL_VFS_RW_ITERATE], [
36 AC_MSG_CHECKING([whether fops->read/write_iter() are available])
37 ZFS_LINUX_TEST_RESULT([file_operations_rw], [
39 AC_DEFINE(HAVE_VFS_RW_ITERATE, 1,
40 [fops->read/write_iter() are available])
45 AC_MSG_CHECKING([whether new_sync_read/write() are available])
46 ZFS_LINUX_TEST_RESULT([new_sync_rw], [
48 AC_DEFINE(HAVE_NEW_SYNC_READ, 1,
49 [new_sync_read()/new_sync_write() are available])
61 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GENERIC_WRITE_CHECKS], [
62 ZFS_LINUX_TEST_SRC([generic_write_checks], [
65 struct kiocb *iocb = NULL;
66 struct iov_iter *iov = NULL;
67 generic_write_checks(iocb, iov);
71 AC_DEFUN([ZFS_AC_KERNEL_VFS_GENERIC_WRITE_CHECKS], [
72 AC_MSG_CHECKING([whether generic_write_checks() takes kiocb])
73 ZFS_LINUX_TEST_RESULT([generic_write_checks], [
75 AC_DEFINE(HAVE_GENERIC_WRITE_CHECKS_KIOCB, 1,
76 [generic_write_checks() takes kiocb])