All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/3] dump.f2fs: support to dump hex of filename in dump_dirent()
@ 2025-03-31  3:00 Chao Yu via Linux-f2fs-devel
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-03-31  3:00 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-04 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-31  3:00 [f2fs-dev] [PATCH 1/3] dump.f2fs: support to dump hex of filename in dump_dirent() Chao Yu via Linux-f2fs-devel
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

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.