All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guo Xuenan via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: Gao Xiang <hsiangkao@linux.alibaba.com>, <linux-erofs@lists.ozlabs.org>
Subject: Re: [PATCH] erofs-utils: dump: add some superblock fields display
Date: Tue, 6 Jun 2023 15:05:58 +0800	[thread overview]
Message-ID: <1ee9c095-e472-e96e-77eb-5e3db0bcd20e@huawei.com> (raw)
In-Reply-To: <95aeb6f0-348a-81e4-2180-a5dfaa18995f@linux.alibaba.com>

Hi Xiang,

On 2023/6/6 13:27, Gao Xiang wrote:
> Hi Xuenan,
>
> On 2023/6/6 11:55, Guo Xuenan wrote:
>> dump.erofs show compression algothrims and sb_exslots,
>
>                  ^ algorithms and sb_extslots
>
sorry :P
>> 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.)
>
Okay, will fix it in v2
>> +    { 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?
>
Take a look at the currently implemented interface, compressor.c define
different compressors for mkfs.erofs, but for dump.erofs we don't care
about that much, we only show compression algothrims name  the image

Best regards
Xuenan.
> Thanks,
> Gao Xiang
>

-- 
Guo Xuenan [OS Kernel Lab]
-----------------------------
Email: guoxuenan@huawei.com

  reply	other threads:[~2023-06-06  7:23 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
2023-06-06  7:05   ` Guo Xuenan via Linux-erofs [this message]
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=1ee9c095-e472-e96e-77eb-5e3db0bcd20e@huawei.com \
    --to=linux-erofs@lists.ozlabs.org \
    --cc=guoxuenan@huawei.com \
    --cc=hsiangkao@linux.alibaba.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.