• Chao Yu's avatar
    f2fs: support idmapped mounts · 984fc4e7
    Chao Yu authored
    This patch enables idmapped mounts for f2fs, since all dedicated helpers
    for this functionality existsm, so, in this patch we just pass down the
    user_namespace argument from the VFS methods to the relevant helpers.
    
    Simple idmap example on f2fs image:
    
    1. truncate -s 128M f2fs.img
    2. mkfs.f2fs f2fs.img
    3. mount f2fs.img /mnt/f2fs/
    4. touch /mnt/f2fs/file
    
    5. ls -ln /mnt/f2fs/
    total 0
    -rw-r--r-- 1 0 0 0 2月   4 13:17 file
    
    6. ./mount-idmapped --map-mount b:0:1001:1 /mnt/f2fs/ /mnt/scratch_f2fs/
    
    7. ls -ln /mnt/scratch_f2fs/
    total 0
    -rw-r--r-- 1 1001 1001 0 2月   4 13:17 file
    Signed-off-by: default avatarChao Yu <chao@kernel.org>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    984fc4e7
acl.c 9.63 KB