diff options
author | youzhongyang <[email protected]> | 2022-10-19 14:17:09 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-19 11:17:09 -0700 |
commit | 2a068a1394d179dda4becf350e3afb4e8819675e (patch) | |
tree | 51890e4daf21593525f801d2889dfe82adbbe4bc /config/kernel-idmap_mnt_api.m4 | |
parent | eaaed26ffb3a14c0c98ce1e6e039e62327ab4447 (diff) |
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 <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes #12923
Closes #13671
Diffstat (limited to 'config/kernel-idmap_mnt_api.m4')
-rw-r--r-- | config/kernel-idmap_mnt_api.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config/kernel-idmap_mnt_api.m4 b/config/kernel-idmap_mnt_api.m4 new file mode 100644 index 000000000..47ddc5702 --- /dev/null +++ b/config/kernel-idmap_mnt_api.m4 @@ -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]) + ]) +]) + |