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 /module/os/linux/zfs/zpl_super.c | |
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 'module/os/linux/zfs/zpl_super.c')
-rw-r--r-- | module/os/linux/zfs/zpl_super.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zpl_super.c b/module/os/linux/zfs/zpl_super.c index e3945a2a0..63ba731dd 100644 --- a/module/os/linux/zfs/zpl_super.c +++ b/module/os/linux/zfs/zpl_super.c @@ -374,7 +374,11 @@ const struct super_operations zpl_super_operations = { struct file_system_type zpl_fs_type = { .owner = THIS_MODULE, .name = ZFS_DRIVER, +#if defined(HAVE_IDMAP_MNT_API) + .fs_flags = FS_USERNS_MOUNT | FS_ALLOW_IDMAP, +#else .fs_flags = FS_USERNS_MOUNT, +#endif .mount = zpl_mount, .kill_sb = zpl_kill_sb, }; |