summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2022-05-06 23:34:41 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2022-05-17 21:19:19 +0300
commitc81d5bae404abc6b257667e84d39b9b50c7063d4 (patch)
tree0ed9ab5c91bb5178f0d5cd06bd6347806323a912 /fs/f2fs/super.c
parentc58d7c55de8bf7afd25d13d6eb8ef68782a51be9 (diff)
downloadlinux-c81d5bae404abc6b257667e84d39b9b50c7063d4.tar.xz
f2fs: do not stop GC when requiring a free section
The f2fs_gc uses a bitmap to indicate pinned sections, but when disabling chckpoint, we call f2fs_gc() with NULL_SEGNO which selects the same dirty segment as a victim all the time, resulting in checkpoint=disable failure, for example. Let's pick another one, if we fail to collect it. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index a28c27eed6d0..63daae67a9d9 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2080,7 +2080,8 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
.victim_segno = NULL_SEGNO,
.init_gc_type = FG_GC,
.should_migrate_blocks = false,
- .err_gc_skipped = true };
+ .err_gc_skipped = true,
+ .nr_free_secs = 1 };
f2fs_down_write(&sbi->gc_lock);
err = f2fs_gc(sbi, &gc_control);