1 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
4 dnl # The getattr I/O operations handler type was extended to require
5 dnl # a struct user_namespace* as its first arg, to support idmapped
8 ZFS_LINUX_TEST_SRC([inode_operations_getattr_userns], [
12 struct user_namespace *userns,
13 const struct path *p, struct kstat *k,
14 u32 request_mask, unsigned int query_flags)
17 static const struct inode_operations
18 iops __attribute__ ((unused)) = {
19 .getattr = test_getattr,
25 dnl # See torvalds/linux@a528d35
27 ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [
31 const struct path *p, struct kstat *k,
32 u32 request_mask, unsigned int query_flags)
35 static const struct inode_operations
36 iops __attribute__ ((unused)) = {
37 .getattr = test_getattr,
41 ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
45 struct vfsmount *mnt, struct dentry *d,
49 static const struct inode_operations
50 iops __attribute__ ((unused)) = {
51 .getattr = test_getattr,
56 AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [
58 dnl # Kernel 5.12 test
60 AC_MSG_CHECKING([whether iops->getattr() takes user_namespace])
61 ZFS_LINUX_TEST_RESULT([inode_operations_getattr_userns], [
63 AC_DEFINE(HAVE_USERNS_IOPS_GETATTR, 1,
64 [iops->getattr() takes struct user_namespace*])
69 dnl # Kernel 4.11 test
71 AC_MSG_CHECKING([whether iops->getattr() takes a path])
72 ZFS_LINUX_TEST_RESULT([inode_operations_getattr_path], [
74 AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1,
75 [iops->getattr() takes a path])
80 dnl # Kernel < 4.11 test
82 AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount])
83 ZFS_LINUX_TEST_RESULT([inode_operations_getattr_vfsmount], [
85 AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1,
86 [iops->getattr() takes a vfsmount])