]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-vfs-rw-iterate.m4
Use zap_count instead of cached z_size for unlink
[mirror_zfs.git] / config / kernel-vfs-rw-iterate.m4
CommitLineData
57ae8400 1dnl #
7a789346 2dnl # Linux 3.16 API
57ae8400
MK
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])
7a789346
CC
24
25 ZFS_AC_KERNEL_NEW_SYNC_READ
26 ],[
27 AC_MSG_RESULT(no)
28 ])
29])
30
31dnl #
32dnl # Linux 4.1 API
33dnl #
34AC_DEFUN([ZFS_AC_KERNEL_NEW_SYNC_READ],
35 [AC_MSG_CHECKING([whether new_sync_read() is available])
36 ZFS_LINUX_TRY_COMPILE([
37 #include <linux/fs.h>
38 ],[
39 new_sync_read(NULL, NULL, 0, NULL);
40 ],[
41 AC_MSG_RESULT(yes)
42 AC_DEFINE(HAVE_NEW_SYNC_READ, 1,
43 [new_sync_read() is available])
57ae8400
MK
44 ],[
45 AC_MSG_RESULT(no)
46 ])
47])
933ec999
CC
48
49dnl #
50dnl # Linux 4.1.x API
51dnl #
52AC_DEFUN([ZFS_AC_KERNEL_GENERIC_WRITE_CHECKS],
53 [AC_MSG_CHECKING([whether generic_write_checks() takes kiocb])
54 ZFS_LINUX_TRY_COMPILE([
55 #include <linux/fs.h>
56
57 ],[
58 struct kiocb *iocb = NULL;
59 struct iov_iter *iov = NULL;
60 generic_write_checks(iocb, iov);
61 ],[
62 AC_MSG_RESULT(yes)
63 AC_DEFINE(HAVE_GENERIC_WRITE_CHECKS_KIOCB, 1,
64 [generic_write_checks() takes kiocb])
65 ],[
66 AC_MSG_RESULT(no)
67 ])
68])