Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Guo Xuenan <guoxuenan@huawei.com>,
	chao@kernel.org, linux-erofs@lists.ozlabs.org
Cc: jack.qiu@huawei.com
Subject: Re: [PATCH] erofs-utils: dump: add some superblock fields display
Date: Tue, 6 Jun 2023 13:27:32 +0800	[thread overview]
Message-ID: <95aeb6f0-348a-81e4-2180-a5dfaa18995f@linux.alibaba.com> (raw)
In-Reply-To: <20230606035511.1114101-1-guoxuenan@huawei.com>

Hi Xuenan,

On 2023/6/6 11:55, Guo Xuenan wrote:
> dump.erofs show compression algothrims and sb_exslots,

			     ^ algorithms and sb_extslots

> and update feature information.
> 
> th current super block info displayed as follows:

The proposed super block info is shown as below:

> Filesystem magic number:                      0xE0F5E1E2
> Filesystem blocks:                            4637
> Filesystem inode metadata start block:        0
> Filesystem shared xattr metadata start block: 0
> Filesystem root nid:                          37
> Filesystem compr_algs:                        lz4 lzma
> Filesystem sb_extslots:                       0
> Filesystem inode count:                       36
> Filesystem created:                           Tue Jun  6 10:23:02 2023
> Filesystem features:                          sb_csum mtime lz4_0padding compr_cfgs big_pcluster
> Filesystem UUID:                              not available
> 
> Signed-off-by: Guo Xuenan <guoxuenan@huawei.com>
> ---
>   dump/main.c              | 34 +++++++++++++++++++++++++++++++++-
>   include/erofs/internal.h |  1 +
>   lib/super.c              |  5 +++++
>   3 files changed, 39 insertions(+), 1 deletion(-)
> 
> diff --git a/dump/main.c b/dump/main.c
> index efbc82b..20e1456 100644
> --- a/dump/main.c
> +++ b/dump/main.c
> @@ -93,13 +93,25 @@ struct erofsdump_feature {
>   static struct erofsdump_feature feature_lists[] = {
>   	{ true, EROFS_FEATURE_COMPAT_SB_CHKSUM, "sb_csum" },
>   	{ true, EROFS_FEATURE_COMPAT_MTIME, "mtime" },
> -	{ false, EROFS_FEATURE_INCOMPAT_LZ4_0PADDING, "0padding" },
> +	{ false, EROFS_FEATURE_INCOMPAT_LZ4_0PADDING, "lz4_0padding" },

Better to keep it as is (see kernel code.)

> +	{ false, EROFS_FEATURE_INCOMPAT_COMPR_CFGS, "compr_cfgs" },
>   	{ false, EROFS_FEATURE_INCOMPAT_BIG_PCLUSTER, "big_pcluster" },
>   	{ false, EROFS_FEATURE_INCOMPAT_CHUNKED_FILE, "chunked_file" },
>   	{ false, EROFS_FEATURE_INCOMPAT_DEVICE_TABLE, "device_table" },
>   	{ false, EROFS_FEATURE_INCOMPAT_ZTAILPACKING, "ztailpacking" },
>   	{ false, EROFS_FEATURE_INCOMPAT_FRAGMENTS, "fragments" },
>   	{ false, EROFS_FEATURE_INCOMPAT_DEDUPE, "dedupe" },
> +	{ false, EROFS_FEATURE_INCOMPAT_XATTR_PREFIXES, "xattr_prefixes" },
> +};
> +
> +struct available_alg {
> +	int type;
> +	const char *name;
> +};

Could we use lib/compressor.c instead?

Thanks,
Gao Xiang

  reply	other threads:[~2023-06-06  5:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06  3:55 [PATCH] erofs-utils: dump: add some superblock fields display Guo Xuenan via Linux-erofs
2023-06-06  5:27 ` Gao Xiang [this message]
2023-06-06  7:05   ` Guo Xuenan via Linux-erofs
2023-06-06  7:28   ` Guo Xuenan
2023-06-06  7:58     ` Gao Xiang
2023-06-06  8:39       ` Guo Xuenan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95aeb6f0-348a-81e4-2180-a5dfaa18995f@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=chao@kernel.org \
    --cc=guoxuenan@huawei.com \
    --cc=jack.qiu@huawei.com \
    --cc=linux-erofs@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox