diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-05-07 00:23:27 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-05-12 23:30:19 +0300 |
commit | c58d7c55de8bf7afd25d13d6eb8ef68782a51be9 (patch) | |
tree | 8f2a31285d5bf5c7b5d27a9e2af4293c180e13e8 | |
parent | d147ea4adb969b03f7f1c7613cc6f44b70760eb3 (diff) | |
download | linux-c58d7c55de8bf7afd25d13d6eb8ef68782a51be9.tar.xz |
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>
-rw-r--r-- | fs/f2fs/gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index f3d58d154240..e275b72bc65f 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -37,7 +37,8 @@ static int gc_thread_func(void *data) unsigned int wait_ms; struct f2fs_gc_control gc_control = { .victim_segno = NULL_SEGNO, - .should_migrate_blocks = false }; + .should_migrate_blocks = false, + .err_gc_skipped = false }; wait_ms = gc_th->min_sleep_time; @@ -146,7 +147,6 @@ do_gc: gc_control.init_gc_type = sync_mode ? FG_GC : BG_GC; gc_control.no_bg_gc = foreground; - gc_control.err_gc_skipped = sync_mode; /* if return value is not zero, no victim was selected */ if (f2fs_gc(sbi, &gc_control)) |