HomeFreeBSD

Support idmapped mount in user namespace

Description

Support idmapped mount in user namespace

Linux 5.17 commit torvalds/linux@5dfbfe71e enables "the idmapping
infrastructure to support idmapped mounts of filesystems mounted
with an idmapping". Update the OpenZFS accordingly to improve the
idmapped mount support.

This pull request contains the following changes:

  • xattr setter functions are fixed to take mnt_ns argument. Without this, cp -p would fail for an idmapped mount in a user namespace.
  • idmap_util is enhanced/fixed for its use in a user ns context.
  • One test case added to test idmapped mount in a user ns.

Reviewed-by: Christian Brauner <christian@brauner.io>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes #14097

Details

Provenance
youzhongyang <youzhong@gmail.com>Authored on Nov 8 2022, 6:28 PM
GitHub <noreply@github.com>Committed on Nov 8 2022, 6:28 PM
Parents
rG109731cd73c5: dsl_prop_known_index(): check for invalid prop
Branches
Unknown
Tags
Unknown