summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2022-05-06 11:40:33 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2022-05-12 13:29:14 -0700
commitd147ea4adb969b03f7f1c7613cc6f44b70760eb3 (patch)
treea3e7ab4a6fccf10a1390457a471a66629dd8c928 /fs/f2fs/super.c
parent64e3ed0b8ea019597d0b5448fdf05a29eb65ae95 (diff)
downloadlinux-rpi-d147ea4adb969b03f7f1c7613cc6f44b70760eb3.tar.gz
linux-rpi-d147ea4adb969b03f7f1c7613cc6f44b70760eb3.tar.bz2
linux-rpi-d147ea4adb969b03f7f1c7613cc6f44b70760eb3.zip
f2fs: introduce f2fs_gc_control to consolidate f2fs_gc parameters
No functional change. - remove checkpoint=disable check for f2fs_write_checkpoint - get sec_freed all the time 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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 8c81dd324297..a28c27eed6d0 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2076,8 +2076,14 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
sbi->gc_mode = GC_URGENT_HIGH;
while (!f2fs_time_over(sbi, DISABLE_TIME)) {
+ struct f2fs_gc_control gc_control = {
+ .victim_segno = NULL_SEGNO,
+ .init_gc_type = FG_GC,
+ .should_migrate_blocks = false,
+ .err_gc_skipped = true };
+
f2fs_down_write(&sbi->gc_lock);
- err = f2fs_gc(sbi, true, false, false, NULL_SEGNO);
+ err = f2fs_gc(sbi, &gc_control);
if (err == -ENODATA) {
err = 0;
break;