From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>
Subject: [PATCH] erofs-utils: mkfs: set the default inode fingerprint name
Date: Wed, 1 Jul 2026 16:52:26 +0800 [thread overview]
Message-ID: <20260701085226.2390667-1-hsiangkao@linux.alibaba.com> (raw)
Set `erofs.fingerprint.v1` as the default xattr digest name for
inodes so that these xattrs are invisible to users.
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
mkfs/main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index 4fadb56c7a5c..33c410d71411 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -34,6 +34,8 @@
#include "../lib/liberofs_s3.h"
#include "../lib/liberofs_uuid.h"
+#define EROFS_EA_INODE_DIGEST_DEFAULT "erofs.fingerprint.v1"
+
static struct option long_options[] = {
{"version", no_argument, 0, 'V'},
{"help", no_argument, 0, 'h'},
@@ -102,7 +104,7 @@ static struct option long_options[] = {
{"zD", optional_argument, NULL, 536},
{"MZ", optional_argument, NULL, 537},
{"xattr-prefix", required_argument, NULL, 538},
- {"xattr-inode-digest", required_argument, NULL, 539},
+ {"xattr-inode-digest", optional_argument, NULL, 539},
{0, 0, 0, 0},
};
@@ -256,7 +258,7 @@ static void usage(int argc, char **argv)
#ifdef EROFS_MT_ENABLED
" --workers=# set the number of worker threads to # (default: %u)\n"
#endif
- " --xattr-inode-digest=X specify extended attribute name X to record inode digests\n"
+ " --xattr-inode-digest=X specify extended attribute name X (\"" EROFS_EA_INODE_DIGEST_DEFAULT "\" if omitted) to record inode digests\n"
" --xattr-prefix=X X=extra xattr name prefix\n"
" --zfeature-bits=# toggle filesystem compression features according to given bits #\n"
#ifdef WITH_ANDROID
@@ -1483,6 +1485,8 @@ static int mkfs_parse_options_cfg(struct erofs_importer_params *params,
cfg.c_extra_ea_name_prefixes = true;
break;
case 539:
+ if (!optarg)
+ optarg = EROFS_EA_INODE_DIGEST_DEFAULT;
err = erofs_xattr_set_ishare_prefix(&g_sbi, optarg);
if (err < 0) {
erofs_err("failed to parse ishare name: %s",
--
2.43.5
reply other threads:[~2026-07-01 8:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260701085226.2390667-1-hsiangkao@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.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