4 AC_DEFUN([ZFS_AC_KERNEL_VFS_RW_ITERATE],
5 [AC_MSG_CHECKING([whether fops->read/write_iter() are available])
6 ZFS_LINUX_TRY_COMPILE([
9 ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
11 ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
14 static const struct file_operations
15 fops __attribute__ ((unused)) = {
16 .read_iter = test_read,
17 .write_iter = test_write,
22 AC_DEFINE(HAVE_VFS_RW_ITERATE, 1,
23 [fops->read/write_iter() are available])
25 ZFS_AC_KERNEL_NEW_SYNC_READ
34 AC_DEFUN([ZFS_AC_KERNEL_NEW_SYNC_READ],
35 [AC_MSG_CHECKING([whether new_sync_read/write() are available])
36 ZFS_LINUX_TRY_COMPILE([
39 ssize_t ret __attribute__ ((unused));
40 struct file *filp = NULL;
41 char __user *rbuf = NULL;
42 const char __user *wbuf = NULL;
46 ret = new_sync_read(filp, rbuf, len, &ppos);
47 ret = new_sync_write(filp, wbuf, len, &ppos);
50 AC_DEFINE(HAVE_NEW_SYNC_READ, 1,
51 [new_sync_read()/new_sync_write() are available])
60 AC_DEFUN([ZFS_AC_KERNEL_GENERIC_WRITE_CHECKS],
61 [AC_MSG_CHECKING([whether generic_write_checks() takes kiocb])
62 ZFS_LINUX_TRY_COMPILE([
66 struct kiocb *iocb = NULL;
67 struct iov_iter *iov = NULL;
68 generic_write_checks(iocb, iov);
71 AC_DEFINE(HAVE_GENERIC_WRITE_CHECKS_KIOCB, 1,
72 [generic_write_checks() takes kiocb])