]>
Commit | Line | Data |
---|---|---|
0d6103dd CIK |
1 | dnl # |
2 | dnl # Linux 4.11 API | |
3 | dnl # See torvalds/linux@a528d35 | |
4 | dnl # | |
5 | AC_DEFUN([ZFS_AC_PATH_KERNEL_IOPS_GETATTR], [ | |
6 | AC_MSG_CHECKING([whether iops->getattr() takes a path]) | |
7 | ZFS_LINUX_TRY_COMPILE([ | |
8 | #include <linux/fs.h> | |
9 | ||
10 | int test_getattr( | |
11 | const struct path *p, struct kstat *k, | |
12 | u32 request_mask, unsigned int query_flags) | |
13 | { return 0; } | |
14 | ||
15 | static const struct inode_operations | |
16 | iops __attribute__ ((unused)) = { | |
17 | .getattr = test_getattr, | |
18 | }; | |
19 | ],[ | |
20 | ],[ | |
21 | AC_MSG_RESULT(yes) | |
22 | AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1, | |
23 | [iops->getattr() takes a path]) | |
24 | ],[ | |
25 | AC_MSG_RESULT(no) | |
26 | ]) | |
27 | ]) | |
28 | ||
29 | ||
30 | ||
31 | dnl # | |
32 | dnl # Linux 3.9 - 4.10 API | |
33 | dnl # | |
34 | AC_DEFUN([ZFS_AC_VFSMOUNT_KERNEL_IOPS_GETATTR], [ | |
35 | AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount]) | |
36 | ZFS_LINUX_TRY_COMPILE([ | |
37 | #include <linux/fs.h> | |
38 | ||
39 | int test_getattr( | |
40 | struct vfsmount *mnt, struct dentry *d, | |
41 | struct kstat *k) | |
42 | { return 0; } | |
43 | ||
44 | static const struct inode_operations | |
45 | iops __attribute__ ((unused)) = { | |
46 | .getattr = test_getattr, | |
47 | }; | |
48 | ],[ | |
49 | ],[ | |
50 | AC_MSG_RESULT(yes) | |
51 | AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1, | |
52 | [iops->getattr() takes a vfsmount]) | |
53 | ],[ | |
54 | AC_MSG_RESULT(no) | |
55 | ]) | |
56 | ]) | |
57 | ||
58 | ||
59 | dnl # | |
60 | dnl # The interface of the getattr callback from the inode_operations | |
61 | dnl # structure changed. Also, the interface of the simple_getattr() | |
62 | dnl # function provided by the kernel changed. | |
63 | dnl # | |
64 | AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GETATTR], [ | |
65 | ZFS_AC_PATH_KERNEL_IOPS_GETATTR | |
66 | ZFS_AC_VFSMOUNT_KERNEL_IOPS_GETATTR | |
67 | ]) |