Skip to content

Commit c58d7c5

Browse files
author
Jaegeuk Kim
committed
f2fs: keep wait_ms if EAGAIN happens
In f2fs_gc thread, let's keep wait_ms when sec_freed was zero. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent d147ea4 commit c58d7c5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/f2fs/gc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ static int gc_thread_func(void *data)
3737
unsigned int wait_ms;
3838
struct f2fs_gc_control gc_control = {
3939
.victim_segno = NULL_SEGNO,
40-
.should_migrate_blocks = false };
40+
.should_migrate_blocks = false,
41+
.err_gc_skipped = false };
4142

4243
wait_ms = gc_th->min_sleep_time;
4344

@@ -146,7 +147,6 @@ static int gc_thread_func(void *data)
146147

147148
gc_control.init_gc_type = sync_mode ? FG_GC : BG_GC;
148149
gc_control.no_bg_gc = foreground;
149-
gc_control.err_gc_skipped = sync_mode;
150150

151151
/* if return value is not zero, no victim was selected */
152152
if (f2fs_gc(sbi, &gc_control))

0 commit comments

Comments
 (0)