2021-03-20 07:00:59 +03:00
|
|
|
dnl #
|
|
|
|
dnl # 5.12 API
|
|
|
|
dnl #
|
|
|
|
dnl # generic_fillattr in linux/fs.h now requires a struct user_namespace*
|
|
|
|
dnl # as the first arg, to support idmapped mounts.
|
|
|
|
dnl #
|
2023-04-11 00:15:36 +03:00
|
|
|
dnl # 6.3 API
|
|
|
|
dnl # generic_fillattr() now takes struct mnt_idmap* as the first argument
|
|
|
|
dnl #
|
2023-09-15 07:36:39 +03:00
|
|
|
dnl # 6.6 API
|
|
|
|
dnl # generic_fillattr() now takes u32 as second argument, representing a
|
|
|
|
dnl # request_mask for statx
|
|
|
|
dnl #
|
2023-04-11 00:15:36 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [
|
2021-03-20 07:00:59 +03:00
|
|
|
ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [
|
|
|
|
#include <linux/fs.h>
|
|
|
|
],[
|
|
|
|
struct user_namespace *userns = NULL;
|
|
|
|
struct inode *in = NULL;
|
|
|
|
struct kstat *k = NULL;
|
|
|
|
generic_fillattr(userns, in, k);
|
|
|
|
])
|
2023-04-11 00:15:36 +03:00
|
|
|
|
|
|
|
ZFS_LINUX_TEST_SRC([generic_fillattr_mnt_idmap], [
|
|
|
|
#include <linux/fs.h>
|
|
|
|
],[
|
|
|
|
struct mnt_idmap *idmap = NULL;
|
|
|
|
struct inode *in = NULL;
|
|
|
|
struct kstat *k = NULL;
|
|
|
|
generic_fillattr(idmap, in, k);
|
|
|
|
])
|
2023-09-15 07:36:39 +03:00
|
|
|
|
|
|
|
ZFS_LINUX_TEST_SRC([generic_fillattr_mnt_idmap_reqmask], [
|
|
|
|
#include <linux/fs.h>
|
|
|
|
],[
|
|
|
|
struct mnt_idmap *idmap = NULL;
|
|
|
|
struct inode *in = NULL;
|
|
|
|
struct kstat *k = NULL;
|
|
|
|
generic_fillattr(idmap, 0, in, k);
|
|
|
|
])
|
2021-03-20 07:00:59 +03:00
|
|
|
])
|
|
|
|
|
2023-04-11 00:15:36 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR], [
|
2023-09-15 07:36:39 +03:00
|
|
|
AC_MSG_CHECKING(
|
|
|
|
[whether generic_fillattr requires struct mnt_idmap* and request_mask])
|
|
|
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap_reqmask], [
|
2021-03-20 07:00:59 +03:00
|
|
|
AC_MSG_RESULT([yes])
|
2023-09-15 07:36:39 +03:00
|
|
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK, 1,
|
|
|
|
[generic_fillattr requires struct mnt_idmap* and u32 request_mask])
|
2021-03-20 07:00:59 +03:00
|
|
|
],[
|
2024-08-05 16:22:50 +03:00
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
2023-09-15 07:36:39 +03:00
|
|
|
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
|
|
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
2023-04-11 00:15:36 +03:00
|
|
|
AC_MSG_RESULT([yes])
|
2023-09-15 07:36:39 +03:00
|
|
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
|
|
|
[generic_fillattr requires struct mnt_idmap*])
|
2023-04-11 00:15:36 +03:00
|
|
|
],[
|
2024-08-05 16:22:50 +03:00
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
2023-09-15 07:36:39 +03:00
|
|
|
AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
|
|
|
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
|
|
|
|
[generic_fillattr requires struct user_namespace*])
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
])
|
2023-04-11 00:15:36 +03:00
|
|
|
])
|
2021-03-20 07:00:59 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|