]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-vfs-rw-iterate.m4
OpenZFS 5561 - support root pools on EFI/GPT partitioned disks
[mirror_zfs.git] / config / kernel-vfs-rw-iterate.m4
CommitLineData
57ae8400
MK
1dnl #
2dnl # Linux 4.1.x API
3dnl #
4AC_DEFUN([ZFS_AC_KERNEL_VFS_RW_ITERATE],
5 [AC_MSG_CHECKING([whether fops->read/write_iter() are available])
6 ZFS_LINUX_TRY_COMPILE([
7 #include <linux/fs.h>
8
9 ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
10 { return 0; }
11 ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
12 { return 0; }
13
14 static const struct file_operations
15 fops __attribute__ ((unused)) = {
16 .read_iter = test_read,
17 .write_iter = test_write,
18 };
19 ],[
20 ],[
21 AC_MSG_RESULT(yes)
22 AC_DEFINE(HAVE_VFS_RW_ITERATE, 1,
23 [fops->read/write_iter() are available])
24 ],[
25 AC_MSG_RESULT(no)
26 ])
27])