diff options
author | Daeho Jeong <daehojeong@google.com> | 2022-03-15 21:14:14 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-03-17 09:16:22 -0700 |
commit | d98af5f4552058a5c22030641ef79cee92c61f54 (patch) | |
tree | 6424f4f07188561c7e50428c412894a0b1c7a961 /fs/f2fs/sysfs.c | |
parent | d284af43f703760e261b1601378a0c13a19d5f1f (diff) | |
download | linux-d98af5f4552058a5c22030641ef79cee92c61f54.tar.gz linux-d98af5f4552058a5c22030641ef79cee92c61f54.tar.bz2 linux-d98af5f4552058a5c22030641ef79cee92c61f54.zip |
f2fs: introduce gc_urgent_mid mode
We need a mid level of gc urgent mode to do GC forcibly in a period
of given gc_urgent_sleep_time, but not like using greedy GC approach
and switching to SSR mode such as gc urgent high mode. This can be
used for more aggressive periodic storage clean up.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/sysfs.c')
-rw-r--r-- | fs/f2fs/sysfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 47efcf233afd..fe29bcb70f46 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -468,6 +468,13 @@ out: } } else if (t == 2) { sbi->gc_mode = GC_URGENT_LOW; + } else if (t == 3) { + sbi->gc_mode = GC_URGENT_MID; + if (sbi->gc_thread) { + sbi->gc_thread->gc_wake = 1; + wake_up_interruptible_all( + &sbi->gc_thread->gc_wait_queue_head); + } } else { return -EINVAL; } |