]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: decrease maximum flush retry count in f2fs_enable_checkpoint()
authorChao Yu <chao@kernel.org>
Wed, 21 Jan 2026 05:14:04 +0000 (05:14 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 27 Jan 2026 02:45:59 +0000 (02:45 +0000)
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.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/super.c

index 47f316ac05a35a29340ce876e1195c556f04f653..29f81a496b72f446e39449c46c4eea7e408b3ea5 100644 (file)
@@ -699,6 +699,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
 
index 5d8b2e8123404fc519d7f018dcd0a6fa49bb943a..9d421a07d2d5226c96801717c50f1f111ce3aad3 100644 (file)
@@ -2687,7 +2687,7 @@ restore_flag:
 
 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;