mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
f2fs: make sure zoned device GC to use FG_GC in shortage of free section
We already use FG_GC when we have free sections under gc_boost_zoned_gc_percent. So, let's make it consistent. Signed-off-by: Daeho Jeong <daehojeong@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
78f4e737a5
commit
24bf3ee37f
|
|
@ -144,7 +144,7 @@ static int gc_thread_func(void *data)
|
|||
gc_control.one_time;
|
||||
|
||||
/* foreground GC was been triggered via f2fs_balance_fs() */
|
||||
if (foreground)
|
||||
if (foreground && !f2fs_sb_has_blkzoned(sbi))
|
||||
sync_mode = false;
|
||||
|
||||
gc_control.init_gc_type = sync_mode ? FG_GC : BG_GC;
|
||||
|
|
|
|||
|
|
@ -455,7 +455,8 @@ void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need)
|
|||
} else {
|
||||
struct f2fs_gc_control gc_control = {
|
||||
.victim_segno = NULL_SEGNO,
|
||||
.init_gc_type = BG_GC,
|
||||
.init_gc_type = f2fs_sb_has_blkzoned(sbi) ?
|
||||
FG_GC : BG_GC,
|
||||
.no_bg_gc = true,
|
||||
.should_migrate_blocks = false,
|
||||
.err_gc_skipped = false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user