From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH 1/3] dump.f2fs: support to dump hex of filename in dump_dirent()
Date: Mon, 31 Mar 2025 11:00:32 +0800 [thread overview]
Message-ID: <20250331030034.481423-1-chao@kernel.org> (raw)
dump.f2fs -b $blkaddr -d 3 /dev/vda
[dump_dirent: 991] bitmap pos[0x2] name[❤️] len[0x6] hash[0x19dd7132] ino[0x5] type[0x1]
[dump_dirent: 998] name(hex)[0xe2 0x9d 0xa4 0xef 0xb8 0x8f 0x0]
Signed-off-by: Chao Yu <chao@kernel.org>
---
fsck/dump.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fsck/dump.c b/fsck/dump.c
index dc3c199..66d6c79 100644
--- a/fsck/dump.c
+++ b/fsck/dump.c
@@ -937,7 +937,7 @@ static void dump_dirent(u32 blk_addr, int is_inline, int enc_name)
{
struct f2fs_dentry_ptr d;
void *inline_dentry, *blk;
- int ret, i = 0;
+ int ret, i = 0, j;
blk = calloc(F2FS_BLKSIZE, 1);
ASSERT(blk);
@@ -992,6 +992,11 @@ static void dump_dirent(u32 blk_addr, int is_inline, int enc_name)
le32_to_cpu(de->ino),
de->file_type);
+ DBG(1, "%s", "name(hex)[");
+ for (j = 0; j < F2FS_NAME_LEN && en[j]; j++)
+ MSG(1, "0x%x ", (unsigned char)en[j]);
+ MSG(1, "0x%x]\n", (unsigned char)en[j]);
+
i += GET_DENTRY_SLOTS(name_len);
}
--
2.49.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next reply other threads:[~2025-03-31 3:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 3:00 Chao Yu via Linux-f2fs-devel [this message]
2025-03-31 3:00 ` [f2fs-dev] [PATCH 2/3] dump.f2fs: print s_encoding_flags Chao Yu via Linux-f2fs-devel
2025-03-31 3:00 ` [f2fs-dev] [PATCH 3/3] fsck.f2fs: support to tune linear lookup feature Chao Yu via Linux-f2fs-devel
2025-04-04 19:17 ` Jaegeuk Kim via Linux-f2fs-devel
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=20250331030034.481423-1-chao@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.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 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.