Linux-f2fs-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/3] fsck.f2fs: allow to print more infos before assert() in init_sb_info()
@ 2025-07-11  7:45 Chao Yu via Linux-f2fs-devel
  2025-07-11  7:45 ` [f2fs-dev] [PATCH 2/3] mkfs.f2fs: fix to limit length of main device path in f2fs_parse_options() Chao Yu via Linux-f2fs-devel
  2025-07-11  7:45 ` [f2fs-dev] [PATCH 3/3] fsck.f2fs: fix to use strncmp to avoid out-of-boundary access Chao Yu via Linux-f2fs-devel
  0 siblings, 2 replies; 3+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-07-11  7:45 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel

It allows to print more informations once assert() is triggered
in init_sb_info().

Signed-off-by: Chao Yu <chao@kernel.org>
---
 fsck/mount.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fsck/mount.c b/fsck/mount.c
index a7f16e7..dbbeb56 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -1261,8 +1261,13 @@ int init_sb_info(struct f2fs_sb_info *sbi)
 			if (get_device_info(i))
 				ASSERT(0);
 		} else if (c.func != INJECT) {
-			ASSERT(!strcmp((char *)sb->devs[i].path,
-						(char *)c.devices[i].path));
+			if (strcmp((char *)sb->devs[i].path,
+					(char *)c.devices[i].path)) {
+				MSG(0, "paths mismatch: %s, %s\n",
+					(char *)sb->devs[i].path,
+					(char *)c.devices[i].path);
+				ASSERT(0);
+			}
 		}
 
 		c.devices[i].total_segments =
-- 
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] 3+ messages in thread

end of thread, other threads:[~2025-07-11  7:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11  7:45 [f2fs-dev] [PATCH 1/3] fsck.f2fs: allow to print more infos before assert() in init_sb_info() Chao Yu via Linux-f2fs-devel
2025-07-11  7:45 ` [f2fs-dev] [PATCH 2/3] mkfs.f2fs: fix to limit length of main device path in f2fs_parse_options() Chao Yu via Linux-f2fs-devel
2025-07-11  7:45 ` [f2fs-dev] [PATCH 3/3] fsck.f2fs: fix to use strncmp to avoid out-of-boundary access Chao Yu via Linux-f2fs-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox