erofs: misc cleanups for fscache mode
Subsystems (2)
v2 cover erofs: misc cleanups for fscache mode
changelog
v2:
- patch 1: polish the commit message and documentation (Gao Xiang); add "Reviewed-by" tags
- patch 2: add "Reviewed-by" tags
Some trivial cleanups for fscache mode.
Jingbo Xu (2):
erofs: add documentation for 'domain_id' mount option
erofs: clean up parsing of fscache related options
Documentation/filesystems/erofs.rst | 2 ++ fs/erofs/super.c | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-)
Signature · 1 line
2.19.1.6.gb485710b
PATCH v2 1/2 erofs: add documentation for 'domain_id' mount option
Since the EROFS share domain feature for fscache mode has been available since Linux v6.1, let's add documentation for 'domain_id' mount option.
--- Documentation/filesystems/erofs.rst | 2 ++ 1 file changed, 2 insertions(+)
Documentation/filesystems/erofs.rst +2 -0
@@ -120,6 +120,8 @@ dax={always,never} Use direct access (no page cache). See dax A legacy option which is an alias for ``dax=always``. device=%s Specify a path to an extra device to be used together. fsid=%s Specify a filesystem image ID for Fscache back-end. +domain_id=%s Specify a domain ID in fscache mode so that different images + with the same blobs under a given domain ID can share storage. =================== ========================================================= Sysfs Entries
Signature · 1 line
2.19.1.6.gb485710b
Re: [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option
Quoted 23 lines · Jingbo Xu
Since the EROFS share domain feature for fscache mode has been available since Linux v6.1, let's add documentation for '
domain_id' mount option.Reviewed-by Jia Zhu <[email protected]>Signed-off-by Jingbo Xu <[email protected]>--- Documentation/filesystems/erofs.rst | 2 ++ 1 file changed, 2 insertions(+)Documentation/filesystems/erofs.rst +2
-0@@ -120,6 +120,8 @@ dax={always,never} Use direct access (no page cache). See dax A legacy option which is an alias for ``dax=always``. device=%s Specify a path to an extra device to be used together. fsid=%s Specify a filesystem image ID for Fscache back-end. +domain_id=%s Specify a domain ID in fscache mode so that different images + with the same blobs under a given domain ID can share storage. =================== ========================================================= Sysfs Entries
Signature · 2 lines
Thanks, Jingbo
Re: [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option
In reply to Jingbo XuQuoted 6 lines · Jingbo Xu
Since the EROFS share domain feature for fscache mode has been available since Linux v6.1, let's add documentation for '
domain_id' mount option.Reviewed-by Jia Zhu <[email protected]>Signed-off-by Jingbo Xu <[email protected]>
Thanks,
Gao Xiang
Quoted 17 lines
--- Documentation/filesystems/erofs.rst | 2 ++ 1 file changed, 2 insertions(+)Documentation/filesystems/erofs.rst +2
-0@@ -120,6 +120,8 @@ dax={always,never} Use direct access (no page cache). See dax A legacy option which is an alias for ``dax=always``. device=%s Specify a path to an extra device to be used together. fsid=%s Specify a filesystem image ID for Fscache back-end. +domain_id=%s Specify a domain ID in fscache mode so that different images + with the same blobs under a given domain ID can share storage. =================== ========================================================= Sysfs Entries
Re: [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option
In reply to Jingbo XuQuoted 6 lines · Jingbo Xu
Since the EROFS share domain feature for fscache mode has been available since Linux v6.1, let's add documentation for '
domain_id' mount option.Reviewed-by Jia Zhu <[email protected]>Signed-off-by Jingbo Xu <[email protected]>
Thanks,
PATCH v2 2/2 erofs: clean up parsing of fscache related options
In reply to Jingbo Xu... to avoid the mess of conditional preprocessing as we are continually adding fscache related mount options.
--- fs/erofs/super.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
fs/erofs/super.c +6 -7
@@ -577,26 +577,25 @@ static int erofs_fc_parse_param(struct fs_context *fc, } ++ctx->devs->extra_devices;break ; -case Opt_fsid:#ifdef CONFIG_EROFS_FS_ONDEMAND +case Opt_fsid:kfree (ctx->fsid); ctx->fsid =kstrdup (param->string,GFP_KERNEL );if (!ctx->fsid)return -ENOMEM ; -#else -errorfc (fc,"fsid option not supported" ); -#endif break ;case Opt_domain_id: -#ifdef CONFIG_EROFS_FS_ONDEMAND kfree (ctx->domain_id); ctx->domain_id =kstrdup (param->string,GFP_KERNEL );if (!ctx->domain_id)return -ENOMEM ; +break ;#else -errorfc (fc,"domain_id option not supported" ); -#endif +case Opt_fsid: +case Opt_domain_id: +errorfc (fc,"%s option not supported" , erofs_fs_parameters[opt].name);break ; +#endif default :return -ENOPARAM ; }
Signature · 1 line
2.19.1.6.gb485710b
Re: [PATCH v2 2/2] erofs: clean up parsing of fscache related options
Quoted 6 lines · Jingbo Xu
... to avoid the mess of conditional preprocessing as we are continually adding fscache related mount options.
Reviewd-by Gao Xiang <[email protected]>Reviewed-by Yue Hu <[email protected]>Signed-off-by Jingbo Xu <[email protected]>
Thanks,