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], [
10 static int test_setattr(
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], [
30 static int test_setattr(
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,
42 AC_DEFUN([ZFS_AC_KERNEL_INODE_SETATTR], [
46 AC_MSG_CHECKING([whether iops->setattr() takes mnt_idmap])
47 ZFS_LINUX_TEST_RESULT([inode_operations_setattr_mnt_idmap], [
49 AC_DEFINE(HAVE_IDMAP_IOPS_SETATTR, 1,
50 [iops->setattr() takes struct mnt_idmap*])
54 dnl # Kernel 5.12 test
56 AC_MSG_CHECKING([whether iops->setattr() takes user_namespace])
57 ZFS_LINUX_TEST_RESULT([inode_operations_setattr_userns], [
59 AC_DEFINE(HAVE_USERNS_IOPS_SETATTR, 1,
60 [iops->setattr() takes struct user_namespace*])