* [f2fs-dev] [PATCH] fsck.f2fs: use INFO_MSG() to print i_gc_failure reset info
@ 2023-09-04 15:10 Chao Yu
0 siblings, 0 replies; only message in thread
From: Chao Yu @ 2023-09-04 15:10 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel
fsck.f2fs prints i_gc_failures reset message w/ [FIX] tags, it's not
appropriate due to reset i_gc_failures is not a fix.
Let's add INFO_MSG() macro to print such important non-fix message.
Signed-off-by: Chao Yu <chao@kernel.org>
---
fsck/fsck.c | 2 +-
include/f2fs_fs.h | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 78ffdb6..a30719e 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1282,7 +1282,7 @@ skip_blkcnt_fix:
if (c.fix_on) {
node_blk->i.i_gc_failures = cpu_to_le16(0);
need_fix = 1;
- FIX_MSG("Regular: 0x%x reset i_gc_failures from 0x%x to 0x00",
+ INFO_MSG("Regular: 0x%x reset i_gc_failures from 0x%x to 0x00",
nid, i_gc_failures);
}
}
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 7e7db22..bc4f7b8 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -235,6 +235,13 @@ static inline uint64_t bswap_64(uint64_t val)
/*
* Debugging interfaces
*/
+
+#define INFO_MSG(fmt, ...) \
+ do { \
+ printf("[INFO] (%s:%4d) ", __func__, __LINE__); \
+ printf(" --> "fmt"\n", ##__VA_ARGS__); \
+ } while (0)
+
#define FIX_MSG(fmt, ...) \
do { \
printf("[FIX] (%s:%4d) ", __func__, __LINE__); \
--
2.40.1
_______________________________________________
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] only message in thread
only message in thread, other threads:[~2023-09-04 15:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-04 15:10 [f2fs-dev] [PATCH] fsck.f2fs: use INFO_MSG() to print i_gc_failure reset info Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).