mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
d4dc53dad2
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap type for mounts (struct mnt_idmap), we need to detect these changes and make zfs work with the new APIs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes #14682
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
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 #
|
|
dnl # 6.3 API
|
|
dnl # generic_fillattr() now takes struct mnt_idmap* as the first argument
|
|
dnl #
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [
|
|
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);
|
|
])
|
|
|
|
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);
|
|
])
|
|
])
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR], [
|
|
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
|
AC_MSG_RESULT([yes])
|
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
|
[generic_fillattr requires struct mnt_idmap*])
|
|
],[
|
|
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])
|
|
])
|
|
])
|
|
])
|
|
|