summaryrefslogtreecommitdiffstats
path: root/fs/erofs/sysfs.c
diff options
context:
space:
mode:
authorJeffle Xu <jefflexu@linux.alibaba.com>2022-04-25 20:21:43 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2022-05-18 00:11:21 +0800
commit9c0cc9c729657446ed001a99488a9d82f5124af4 (patch)
treee93c48b169b8a2eed5969a3956e5461e80f17780 /fs/erofs/sysfs.c
parentc665b394b9e8c534e220da876adbd4db990b4c1b (diff)
downloadlinux-9c0cc9c729657446ed001a99488a9d82f5124af4.tar.gz
linux-9c0cc9c729657446ed001a99488a9d82f5124af4.tar.bz2
linux-9c0cc9c729657446ed001a99488a9d82f5124af4.zip
erofs: add 'fsid' mount option
Introduce 'fsid' mount option to enable on-demand read sementics, in which case, erofs will be mounted from data blobs. Users could specify the name of primary data blob by this mount option. Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20220425122143.56815-22-jefflexu@linux.alibaba.com Acked-by: Chao Yu <chao@kernel.org> Tested-by: Zichen Tian <tianzichen@kuaishou.com> Tested-by: Jia Zhu <zhujia.zj@bytedance.com> Tested-by: Yan Song <yansong.ys@antgroup.com> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/sysfs.c')
-rw-r--r--fs/erofs/sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c
index f3babf1e6608..c1383e508bbe 100644
--- a/fs/erofs/sysfs.c
+++ b/fs/erofs/sysfs.c
@@ -205,8 +205,8 @@ int erofs_register_sysfs(struct super_block *sb)
sbi->s_kobj.kset = &erofs_root;
init_completion(&sbi->s_kobj_unregister);
- err = kobject_init_and_add(&sbi->s_kobj, &erofs_sb_ktype, NULL,
- "%s", sb->s_id);
+ err = kobject_init_and_add(&sbi->s_kobj, &erofs_sb_ktype, NULL, "%s",
+ erofs_is_fscache_mode(sb) ? sbi->opt.fsid : sb->s_id);
if (err)
goto put_sb_kobj;
return 0;