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() is available])
36 ZFS_LINUX_TRY_COMPILE([
39 new_sync_read(NULL, NULL, 0, NULL);
42 AC_DEFINE(HAVE_NEW_SYNC_READ, 1,
43 [new_sync_read() is available])
52 AC_DEFUN([ZFS_AC_KERNEL_GENERIC_WRITE_CHECKS],
53 [AC_MSG_CHECKING([whether generic_write_checks() takes kiocb])
54 ZFS_LINUX_TRY_COMPILE([
58 struct kiocb *iocb = NULL;
59 struct iov_iter *iov = NULL;
60 generic_write_checks(iocb, iov);
63 AC_DEFINE(HAVE_GENERIC_WRITE_CHECKS_KIOCB, 1,
64 [generic_write_checks() takes kiocb])