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 <guoxue...@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: guoxue...@huawei.com

Reply via email to