mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Support idmapped mount
Adds support for idmapped mounts. Supported as of Linux 5.12 this functionality allows user and group IDs to be remapped without changing their state on disk. This can be useful for portable home directories and a variety of container related use cases. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes #12923 Closes #13671
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
dnl #
|
||||
dnl # 5.12 API
|
||||
dnl #
|
||||
dnl # Check if APIs for idmapped mount are available
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_IDMAP_MNT_API], [
|
||||
ZFS_LINUX_TEST_SRC([idmap_mnt_api], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
int fs_flags = 0;
|
||||
fs_flags |= FS_ALLOW_IDMAP;
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_IDMAP_MNT_API], [
|
||||
AC_MSG_CHECKING([whether APIs for idmapped mount are present])
|
||||
ZFS_LINUX_TEST_RESULT([idmap_mnt_api], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_IDMAP_MNT_API, 1,
|
||||
[APIs for idmapped mount are present])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
|
||||
@@ -147,6 +147,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_ZERO_PAGE
|
||||
ZFS_AC_KERNEL_SRC___COPY_FROM_USER_INATOMIC
|
||||
ZFS_AC_KERNEL_SRC_USER_NS_COMMON_INUM
|
||||
ZFS_AC_KERNEL_SRC_IDMAP_MNT_API
|
||||
|
||||
AC_MSG_CHECKING([for available kernel interfaces])
|
||||
ZFS_LINUX_TEST_COMPILE_ALL([kabi])
|
||||
@@ -267,6 +268,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_ZERO_PAGE
|
||||
ZFS_AC_KERNEL___COPY_FROM_USER_INATOMIC
|
||||
ZFS_AC_KERNEL_USER_NS_COMMON_INUM
|
||||
ZFS_AC_KERNEL_IDMAP_MNT_API
|
||||
])
|
||||
|
||||
dnl #
|
||||
|
||||
Reference in New Issue
Block a user