[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210811101608.197664-1-frank.li@vivo.com>
Date: Wed, 11 Aug 2021 18:16:08 +0800
From: Yangtao Li <frank.li@...o.com>
To: jaegeuk@...nel.org, chao@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Yangtao Li <frank.li@...o.com>
Subject: [PATCH] f2fs: warn on when fsck flag is set
SBI_NEED_FSCK is an indicator that fsck.f2fs needs to be triggered,
this flag is set in too many places. For some scenes that are not very
reproducible, adding stack information will help locate the problem.
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
fs/f2fs/f2fs.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 67faa43cc141..7e185446d2df 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1999,6 +1999,7 @@ static inline bool is_sbi_flag_set(struct f2fs_sb_info *sbi, unsigned int type)
static inline void set_sbi_flag(struct f2fs_sb_info *sbi, unsigned int type)
{
+ WARN_ON_ONCE(type == SBI_NEED_FSCK);
set_bit(type, &sbi->s_flag);
}
--
2.32.0
Powered by blists - more mailing lists