[PATCH v1] erofs: remove the guard of showing domain_id and fsid

Hongbo Li lihongbo22 at huawei.com
Mon Mar 30 18:48:47 AEDT 2026


Hi Yuezhang

On 2026/3/30 15:32, Yuezhang Mo wrote:
> This change fixes an issue where domain_id was not shown when
> CONFIG_EROFS_FS_PAGE_CACHE_SHARE is enabled, as this configuration
> is mutually exclusive with CONFIG_EROFS_FS_ONDEMAND.
> 
> Both domain_id and fsid fields are present in struct erofs_sb_info
> regardless of configuration. They are not set if the configurations
> are not enabled, and remain NULL. Therefore, the conditional guard
> in erofs_show_options() are unnecessary and can be removed.
> 
> Signed-off-by: Yuezhang Mo <Yuezhang.Mo at sony.com>
> Reviewed-by: Friendy Su <friendy.su at sony.com>
> Reviewed-by: Daniel Palmer <daniel.palmer at sony.com>
> ---
>   fs/erofs/super.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 972a0c82198d..be028cdf902c 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -1095,12 +1095,10 @@ static int erofs_show_options(struct seq_file *seq, struct dentry *root)
>   		seq_puts(seq, ",dax=never");
>   	if (erofs_is_fileio_mode(sbi) && test_opt(opt, DIRECT_IO))
>   		seq_puts(seq, ",directio");
> -	if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND)) {
> -		if (sbi->fsid)
> -			seq_printf(seq, ",fsid=%s", sbi->fsid);
> -		if (sbi->domain_id)
> -			seq_printf(seq, ",domain_id=%s", sbi->domain_id);
> -	}
> +	if (sbi->fsid)
> +		seq_printf(seq, ",fsid=%s", sbi->fsid);
> +	if (sbi->domain_id)
> +		seq_printf(seq, ",domain_id=%s", sbi->domain_id);

The domain_id in CONFIG_EROFS_FS_PAGE_CACHE_SHARE case means the trusted 
domain. We cannot show it to user.

Thanks,
Hongbo

>   	if (sbi->dif0.fsoff)
>   		seq_printf(seq, ",fsoffset=%llu", sbi->dif0.fsoff);
>   	if (test_opt(opt, INODE_SHARE))


More information about the Linux-erofs mailing list