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/f2fs.h | |
parent | d284af43f703760e261b1601378a0c13a19d5f1f (diff) | |
download | linux-stable-d98af5f4552058a5c22030641ef79cee92c61f54.tar.gz linux-stable-d98af5f4552058a5c22030641ef79cee92c61f54.tar.bz2 linux-stable-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/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index da729f53daa8..3016b6354a68 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1313,6 +1313,7 @@ enum { GC_IDLE_AT, GC_URGENT_HIGH, GC_URGENT_LOW, + GC_URGENT_MID, MAX_GC_MODE, }; @@ -2784,6 +2785,9 @@ static inline bool is_idle(struct f2fs_sb_info *sbi, int type) if (is_inflight_io(sbi, type)) return false; + if (sbi->gc_mode == GC_URGENT_MID) + return true; + if (sbi->gc_mode == GC_URGENT_LOW && (type == DISCARD_TIME || type == GC_TIME)) return true; |