diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-05-06 11:40:33 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-05-12 13:29:14 -0700 |
commit | d147ea4adb969b03f7f1c7613cc6f44b70760eb3 (patch) | |
tree | a3e7ab4a6fccf10a1390457a471a66629dd8c928 /fs/f2fs/segment.c | |
parent | 64e3ed0b8ea019597d0b5448fdf05a29eb65ae95 (diff) |
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/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 47934995e2ca..8b4f2b1d2cca 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -399,8 +399,14 @@ void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need) io_schedule(); finish_wait(&sbi->gc_thread->fggc_wq, &wait); } else { + struct f2fs_gc_control gc_control = { + .victim_segno = NULL_SEGNO, + .init_gc_type = BG_GC, + .no_bg_gc = true, + .should_migrate_blocks = false, + .err_gc_skipped = false }; f2fs_down_write(&sbi->gc_lock); - f2fs_gc(sbi, false, false, false, NULL_SEGNO); + f2fs_gc(sbi, &gc_control); } } } |