]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-inode-getattr.m4
Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b
[FreeBSD/FreeBSD.git] / config / kernel-inode-getattr.m4
1 dnl #
2 dnl # Linux 4.11 API
3 dnl # See torvalds/linux@a528d35
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
6         ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [
7                 #include <linux/fs.h>
8
9                 int test_getattr(
10                     const struct path *p, struct kstat *k,
11                     u32 request_mask, unsigned int query_flags)
12                     { return 0; }
13
14                 static const struct inode_operations
15                     iops __attribute__ ((unused)) = {
16                         .getattr = test_getattr,
17                 };
18         ],[])
19
20         ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
21                 #include <linux/fs.h>
22
23                 int test_getattr(
24                     struct vfsmount *mnt, struct dentry *d,
25                     struct kstat *k)
26                     { return 0; }
27
28                 static const struct inode_operations
29                     iops __attribute__ ((unused)) = {
30                         .getattr = test_getattr,
31                 };
32         ],[])
33 ])
34
35 AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [
36         AC_MSG_CHECKING([whether iops->getattr() takes a path])
37         ZFS_LINUX_TEST_RESULT([inode_operations_getattr_path], [
38                 AC_MSG_RESULT(yes)
39                 AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1,
40                     [iops->getattr() takes a path])
41         ],[
42                 AC_MSG_RESULT(no)
43
44                 AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount])
45                 ZFS_LINUX_TEST_RESULT([inode_operations_getattr_vfsmount], [
46                         AC_MSG_RESULT(yes)
47                         AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1,
48                             [iops->getattr() takes a vfsmount])
49                 ],[
50                         AC_MSG_RESULT(no)
51                 ])
52         ])
53 ])