]>
Commit | Line | Data |
---|---|---|
57ae8400 MK |
1 | dnl # |
2 | dnl # Linux 4.1.x API | |
3 | dnl # | |
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([ | |
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 | ]) | |
933ec999 CC |
28 | |
29 | dnl # | |
30 | dnl # Linux 4.1.x API | |
31 | dnl # | |
32 | AC_DEFUN([ZFS_AC_KERNEL_GENERIC_WRITE_CHECKS], | |
33 | [AC_MSG_CHECKING([whether generic_write_checks() takes kiocb]) | |
34 | ZFS_LINUX_TRY_COMPILE([ | |
35 | #include <linux/fs.h> | |
36 | ||
37 | ],[ | |
38 | struct kiocb *iocb = NULL; | |
39 | struct iov_iter *iov = NULL; | |
40 | generic_write_checks(iocb, iov); | |
41 | ],[ | |
42 | AC_MSG_RESULT(yes) | |
43 | AC_DEFINE(HAVE_GENERIC_WRITE_CHECKS_KIOCB, 1, | |
44 | [generic_write_checks() takes kiocb]) | |
45 | ],[ | |
46 | AC_MSG_RESULT(no) | |
47 | ]) | |
48 | ]) |