diff options
author | Chao Yu <chao@kernel.org> | 2022-02-04 06:24:56 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-02-12 15:20:46 +0100 |
commit | 984fc4e76d63345499f01c0c198a4b44860cf027 (patch) | |
tree | 636e0dd2d676e883f7bc57c45e83c0422679f2de /fs/f2fs/super.c | |
parent | f2fs: add a way to limit roll forward recovery time (diff) | |
download | linux-984fc4e76d63345499f01c0c198a4b44860cf027.tar.xz linux-984fc4e76d63345499f01c0c198a4b44860cf027.zip |
f2fs: support idmapped mounts
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: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | fs/f2fs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index f816d7d1987d..22fb4d3b1170 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4539,7 +4539,7 @@ static struct file_system_type f2fs_fs_type = { .name = "f2fs", .mount = f2fs_mount, .kill_sb = kill_f2fs_super, - .fs_flags = FS_REQUIRES_DEV, + .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP, }; MODULE_ALIAS_FS("f2fs"); |