1 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
4 dnl # The first arg of setattr I/O operations handler type
5 dnl # is changed to struct mnt_idmap*
7 ZFS_LINUX_TEST_SRC([inode_operations_setattr_mnt_idmap], [
11 struct mnt_idmap *idmap,
12 struct dentry *de, struct iattr *ia)
15 static const struct inode_operations
16 iops __attribute__ ((unused)) = {
17 .setattr = test_setattr,
23 dnl # The setattr I/O operations handler type was extended to require
24 dnl # a struct user_namespace* as its first arg, to support idmapped
27 ZFS_LINUX_TEST_SRC([inode_operations_setattr_userns], [
31 struct user_namespace *userns,
32 struct dentry *de, struct iattr *ia)
35 static const struct inode_operations
36 iops __attribute__ ((unused)) = {
37 .setattr = test_setattr,
41 ZFS_LINUX_TEST_SRC([inode_operations_setattr], [
45 struct dentry *de, struct iattr *ia)
48 static const struct inode_operations
49 iops __attribute__ ((unused)) = {
50 .setattr = test_setattr,
55 AC_DEFUN([ZFS_AC_KERNEL_INODE_SETATTR], [
59 AC_MSG_CHECKING([whether iops->setattr() takes mnt_idmap])
60 ZFS_LINUX_TEST_RESULT([inode_operations_setattr_mnt_idmap], [
62 AC_DEFINE(HAVE_IDMAP_IOPS_SETATTR, 1,
63 [iops->setattr() takes struct mnt_idmap*])
67 dnl # Kernel 5.12 test
69 AC_MSG_CHECKING([whether iops->setattr() takes user_namespace])
70 ZFS_LINUX_TEST_RESULT([inode_operations_setattr_userns], [
72 AC_DEFINE(HAVE_USERNS_IOPS_SETATTR, 1,
73 [iops->setattr() takes struct user_namespace*])
77 AC_MSG_CHECKING([whether iops->setattr() exists])
78 ZFS_LINUX_TEST_RESULT([inode_operations_setattr], [
80 AC_DEFINE(HAVE_IOPS_SETATTR, 1,
81 [iops->setattr() exists])