Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] erofs: misc cleanups for fscache mode
@ 2023-01-12  6:54 Jingbo Xu
  2023-01-12  6:54 ` [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option Jingbo Xu
  2023-01-12  6:54 ` [PATCH v2 2/2] erofs: clean up parsing of fscache related options Jingbo Xu
  0 siblings, 2 replies; 7+ messages in thread
From: Jingbo Xu @ 2023-01-12  6:54 UTC (permalink / raw)
  To: xiang, chao, linux-erofs; +Cc: huyue2

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(-)

-- 
2.19.1.6.gb485710b


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option
  2023-01-12  6:54 [PATCH v2 0/2] erofs: misc cleanups for fscache mode Jingbo Xu
@ 2023-01-12  6:54 ` Jingbo Xu
  2023-01-12  6:55   ` Jingbo Xu
                     ` (2 more replies)
  2023-01-12  6:54 ` [PATCH v2 2/2] erofs: clean up parsing of fscache related options Jingbo Xu
  1 sibling, 3 replies; 7+ messages in thread
From: Jingbo Xu @ 2023-01-12  6:54 UTC (permalink / raw)
  To: xiang, chao, linux-erofs; +Cc: huyue2

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.

Cc: linux-doc@vger.kernel.org
Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
 Documentation/filesystems/erofs.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/filesystems/erofs.rst b/Documentation/filesystems/erofs.rst
index 067fd1670b1f..a43aacf1494e 100644
--- a/Documentation/filesystems/erofs.rst
+++ b/Documentation/filesystems/erofs.rst
@@ -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
-- 
2.19.1.6.gb485710b


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] erofs: clean up parsing of fscache related options
  2023-01-12  6:54 [PATCH v2 0/2] erofs: misc cleanups for fscache mode Jingbo Xu
  2023-01-12  6:54 ` [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option Jingbo Xu
@ 2023-01-12  6:54 ` Jingbo Xu
  2023-01-16 13:34   ` Chao Yu
  1 sibling, 1 reply; 7+ messages in thread
From: Jingbo Xu @ 2023-01-12  6:54 UTC (permalink / raw)
  To: xiang, chao, linux-erofs; +Cc: huyue2

... to avoid the mess of conditional preprocessing as we are continually
adding fscache related mount options.

Reviewd-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
 fs/erofs/super.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 481788c24a68..626a615dafc2 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -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;
 	}
-- 
2.19.1.6.gb485710b


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option
  2023-01-12  6:54 ` [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option Jingbo Xu
@ 2023-01-12  6:55   ` Jingbo Xu
  2023-01-12  9:05   ` Gao Xiang
  2023-01-16 13:33   ` Chao Yu
  2 siblings, 0 replies; 7+ messages in thread
From: Jingbo Xu @ 2023-01-12  6:55 UTC (permalink / raw)
  To: xiang, chao, linux-erofs; +Cc: huyue2, linux-doc

cc: linux-doc@vger.kernel.org

On 1/12/23 2:54 PM, Jingbo Xu wrote:
> 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.
> 
> Cc: linux-doc@vger.kernel.org
> Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
> ---
>  Documentation/filesystems/erofs.rst | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/filesystems/erofs.rst b/Documentation/filesystems/erofs.rst
> index 067fd1670b1f..a43aacf1494e 100644
> --- a/Documentation/filesystems/erofs.rst
> +++ b/Documentation/filesystems/erofs.rst
> @@ -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

-- 
Thanks,
Jingbo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option
  2023-01-12  6:54 ` [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option Jingbo Xu
  2023-01-12  6:55   ` Jingbo Xu
@ 2023-01-12  9:05   ` Gao Xiang
  2023-01-16 13:33   ` Chao Yu
  2 siblings, 0 replies; 7+ messages in thread
From: Gao Xiang @ 2023-01-12  9:05 UTC (permalink / raw)
  To: Jingbo Xu, xiang, chao, linux-erofs; +Cc: huyue2



On 2023/1/12 14:54, Jingbo Xu wrote:
> 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.
> 
> Cc: linux-doc@vger.kernel.org
> Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>

Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>

Thanks,
Gao Xiang

> ---
>   Documentation/filesystems/erofs.rst | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/filesystems/erofs.rst b/Documentation/filesystems/erofs.rst
> index 067fd1670b1f..a43aacf1494e 100644
> --- a/Documentation/filesystems/erofs.rst
> +++ b/Documentation/filesystems/erofs.rst
> @@ -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option
  2023-01-12  6:54 ` [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option Jingbo Xu
  2023-01-12  6:55   ` Jingbo Xu
  2023-01-12  9:05   ` Gao Xiang
@ 2023-01-16 13:33   ` Chao Yu
  2 siblings, 0 replies; 7+ messages in thread
From: Chao Yu @ 2023-01-16 13:33 UTC (permalink / raw)
  To: Jingbo Xu, xiang, linux-erofs; +Cc: huyue2

On 2023/1/12 14:54, Jingbo Xu wrote:
> 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.
> 
> Cc: linux-doc@vger.kernel.org
> Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] erofs: clean up parsing of fscache related options
  2023-01-12  6:54 ` [PATCH v2 2/2] erofs: clean up parsing of fscache related options Jingbo Xu
@ 2023-01-16 13:34   ` Chao Yu
  0 siblings, 0 replies; 7+ messages in thread
From: Chao Yu @ 2023-01-16 13:34 UTC (permalink / raw)
  To: Jingbo Xu, xiang, linux-erofs; +Cc: huyue2

On 2023/1/12 14:54, Jingbo Xu wrote:
> ... to avoid the mess of conditional preprocessing as we are continually
> adding fscache related mount options.
> 
> Reviewd-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> Reviewed-by: Yue Hu <huyue2@coolpad.com>
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-16 13:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-12  6:54 [PATCH v2 0/2] erofs: misc cleanups for fscache mode Jingbo Xu
2023-01-12  6:54 ` [PATCH v2 1/2] erofs: add documentation for 'domain_id' mount option Jingbo Xu
2023-01-12  6:55   ` Jingbo Xu
2023-01-12  9:05   ` Gao Xiang
2023-01-16 13:33   ` Chao Yu
2023-01-12  6:54 ` [PATCH v2 2/2] erofs: clean up parsing of fscache related options Jingbo Xu
2023-01-16 13:34   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox