diff options
| author | Chao Yu <chao@kernel.org> | 2026-01-21 08:14:04 +0300 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2026-01-27 05:45:59 +0300 |
| commit | 6bb9010f78d7f0ff0e4a17b1be951e76d96757a5 (patch) | |
| tree | e23a70920b747c26d6b68754ef7407e595d3799d | |
| parent | 1db4b3609aa13efceddeae2e58749acb62d42d71 (diff) | |
| download | linux-6bb9010f78d7f0ff0e4a17b1be951e76d96757a5.tar.xz | |
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.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/f2fs.h | 2 | ||||
| -rw-r--r-- | fs/f2fs/super.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 47f316ac05a3..29f81a496b72 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -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 diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 5d8b2e812340..9d421a07d2d5 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -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; |
