]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-inode-getattr.m4
Improve error message for zfs create with @ or # in name
[mirror_zfs.git] / config / kernel-inode-getattr.m4
CommitLineData
a3478c07
OF
1dnl #
2dnl # Linux 4.11 API
3dnl # See torvalds/linux@a528d35
4dnl #
5AC_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
31dnl #
32dnl # Linux 3.9 - 4.10 API
33dnl #
34AC_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
59dnl #
60dnl # The interface of the getattr callback from the inode_operations
61dnl # structure changed. Also, the interface of the simple_getattr()
62dnl # function provided by the kernel changed.
63dnl #
64AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GETATTR], [
65 ZFS_AC_PATH_KERNEL_IOPS_GETATTR
66 ZFS_AC_VFSMOUNT_KERNEL_IOPS_GETATTR
67])