Skip to contentSkip to conversation

f2fs: decrease maximum flush retry count in f2fs_enable_checkpoint()

PATCH Applied Chao Yu 2 participants 2 messages Jan 21 – Jan 22 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: decrease maximum flush retry count in f2fs_enable_checkpoint()

It's rare case that sync_inodes_sb() always skips to flush some drity datas, so it's enough to give extra three more chances to flush data.

---
 fs/f2fs/f2fs.h  | 2 ++
 fs/f2fs/super.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
fs/f2fs/f2fs.h +2 -0
index 3a8e1dcdcd69..cac4c730bf61 100644
@@ -697,6 +697,8 @@ enum {
 
 #define DEFAULT_RETRY_IO_COUNT	8	/* maximum retry read IO or flush count */
 
+#define MAX_FLUSH_RETRY_COUNT	3	/* maximum flush retry count in f2fs_enable_checkpoint() */
+
 /* IO/non-IO congestion wait timeout value, default: 1 jiffies */
 #define	DEFAULT_SCHEDULE_TIMEOUT	1
 
fs/f2fs/super.c +1 -1
index 5d8b2e812340..9d421a07d2d5 100644
@@ -2687,7 +2687,7 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
 
 static int f2fs_enable_checkpoint(struct f2fs_sb_info *sbi)
 {
-	int retry = DEFAULT_RETRY_IO_COUNT;
+	int retry = MAX_FLUSH_RETRY_COUNT;
 	long long start, writeback, end;
 	int ret;
 	struct f2fs_lock_context lc;
Signature · 1 line
2.49.0
#1 lore raw
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 8 lines · On Wed, 21 Jan 2026 05:14:04 +0000 you wrote:

It's rare case that sync_inodes_sb() always skips to flush some drity datas, so it's enough to give extra three more chances to flush data.

---
 fs/f2fs/f2fs.h  | 2 ++
 fs/f2fs/super.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Here is the summary with links:
- [f2fs-dev] f2fs: decrease maximum flush retry count in f2fs_enable_checkpoint()

    https://git.kernel.org/jaegeuk/f2fs/c/6ca0ae2d1e32

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html