1dnl # 2dnl # 5.12 API 3dnl # 4dnl # generic_fillattr in linux/fs.h now requires a struct user_namespace* 5dnl # as the first arg, to support idmapped mounts. 6dnl # 7dnl # 6.3 API 8dnl # generic_fillattr() now takes struct mnt_idmap* as the first argument 9dnl # 10dnl # 6.6 API 11dnl # generic_fillattr() now takes u32 as second argument, representing a 12dnl # request_mask for statx 13dnl # 14AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [ 15 ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [ 16 #include <linux/fs.h> 17 ],[ 18 struct user_namespace *userns = NULL; 19 struct inode *in = NULL; 20 struct kstat *k = NULL; 21 generic_fillattr(userns, in, k); 22 ]) 23 24 ZFS_LINUX_TEST_SRC([generic_fillattr_mnt_idmap], [ 25 #include <linux/fs.h> 26 ],[ 27 struct mnt_idmap *idmap = NULL; 28 struct inode *in = NULL; 29 struct kstat *k = NULL; 30 generic_fillattr(idmap, in, k); 31 ]) 32 33 ZFS_LINUX_TEST_SRC([generic_fillattr_mnt_idmap_reqmask], [ 34 #include <linux/fs.h> 35 ],[ 36 struct mnt_idmap *idmap = NULL; 37 struct inode *in = NULL; 38 struct kstat *k = NULL; 39 generic_fillattr(idmap, 0, in, k); 40 ]) 41]) 42 43AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR], [ 44 AC_MSG_CHECKING( 45 [whether generic_fillattr requires struct mnt_idmap* and request_mask]) 46 ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap_reqmask], [ 47 AC_MSG_RESULT([yes]) 48 AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK, 1, 49 [generic_fillattr requires struct mnt_idmap* and u32 request_mask]) 50 ],[ 51 AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*]) 52 ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [ 53 AC_MSG_RESULT([yes]) 54 AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1, 55 [generic_fillattr requires struct mnt_idmap*]) 56 ],[ 57 AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*]) 58 ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [ 59 AC_MSG_RESULT([yes]) 60 AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1, 61 [generic_fillattr requires struct user_namespace*]) 62 ],[ 63 AC_MSG_RESULT([no]) 64 ]) 65 ]) 66 ]) 67]) 68 69