erofs: misc cleanups for fscache mode
Subsystems (2)
cover erofs: misc cleanups for fscache mode
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 | 3 +++ fs/erofs/super.c | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-)
Signature · 1 line
2.19.1.6.gb485710b
PATCH 1/2 erofs: add documentation for 'domain_id' mount option
The share domain feature for fscache mode has been merged, and let's add documentation for 'domain_id' mount option.
--- Documentation/filesystems/erofs.rst | 3 +++ 1 file changed, 3 insertions(+)
Documentation/filesystems/erofs.rst +3 -0
@@ -120,6 +120,9 @@ 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 for Fscache back-end. The blob + images are shared among filesystem instances in the same + domain. =================== ========================================================= Sysfs Entries
Signature · 1 line
2.19.1.6.gb485710b
Re: [External] [PATCH 1/2] erofs: add documentation for 'domain_id' mount option
Quoted 4 lines · Jingbo Xu
The share domain feature for fscache mode has been merged, and let's add documentation for '
domain_id' mount option.Signed-off-by Jingbo Xu <[email protected]>
Thanks.
Quoted 18 lines
--- Documentation/filesystems/erofs.rst | 3 +++ 1 file changed, 3 insertions(+)Documentation/filesystems/erofs.rst +3
-0@@ -120,6 +120,9 @@ 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 for Fscache back-end. The blob + images are shared among filesystem instances in the same + domain. =================== ========================================================= Sysfs Entries
Re: [PATCH 1/2] erofs: add documentation for 'domain_id' mount option
In reply to Jingbo XuQuoted 2 lines · Jingbo Xu
The share domain feature for fscache mode has been merged, and let's 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.
Quoted 11 lines
Signed-off-by Jingbo Xu <[email protected]>--- Documentation/filesystems/erofs.rst | 3 +++ 1 file changed, 3 insertions(+)Documentation/filesystems/erofs.rst +0
-0
Documentation/filesystems/erofs.rst dax={always,never} Use direct access (no page cache). See · line 125
Quoted 6 lines
Documentation/filesystems/erofs.rst +3
-0@@ -120,6 +120,9 @@ 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 for Fscache back-end. The blob + images are shared among filesystem instances in the same + domain.
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.
Thanks,
Gao Xiang
Quoted 3 lines
Documentation/filesystems/erofs.rst +0
-0=================== ========================================================= Sysfs Entries
PATCH 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: [External] [PATCH 2/2] erofs: clean up parsing of fscache related options
Quoted 4 lines · Jingbo Xu
... to avoid the mess of conditional preprocessing as we are continually adding fscache related mount options.
Signed-off-by Jingbo Xu <[email protected]>
Thanks.
Quoted 41 lines
--- 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 ; }
Re: [PATCH 2/2] erofs: clean up parsing of fscache related options
In reply to Jingbo XuQuoted 4 lines · Jingbo Xu
... to avoid the mess of conditional preprocessing as we are continually adding fscache related mount options.
Signed-off-by Jingbo Xu <[email protected]>
Thanks,
Gao Xiang
Re: [PATCH 2/2] erofs: clean up parsing of fscache related options
In reply to Jingbo XuQuoted 4 lines · On Wed, 11 Jan 2023 16:15:47 +0800 Jingbo Xu <[email protected]> wrote:
... to avoid the mess of conditional preprocessing as we are continually adding fscache related mount options.
Signed-off-by Jingbo Xu <[email protected]>