diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-09-09 11:11:04 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-09-21 14:52:40 -0700 |
commit | 29f775fa640d4df8d5a1a0dad0b1c44143a00007 (patch) | |
tree | 2dac3490c02f6d08146535868b3ceb0134f70ae1 /fs/f2fs/segment.h | |
parent | ef75b9afda215c1446195bf487987af43a458959 (diff) |
f2fs: speed up gc_urgent mode with SSR
This patch activates SSR in gc_urgent mode.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index b8aa84109bf5..ffa11274b0ce 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -497,19 +497,6 @@ static inline int reserved_sections(struct f2fs_sb_info *sbi) return GET_SEC_FROM_SEG(sbi, (unsigned int)reserved_segments(sbi)); } -static inline bool need_SSR(struct f2fs_sb_info *sbi) -{ - int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES); - int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS); - int imeta_secs = get_blocktype_secs(sbi, F2FS_DIRTY_IMETA); - - if (test_opt(sbi, LFS)) - return false; - - return free_sections(sbi) <= (node_secs + 2 * dent_secs + imeta_secs + - 2 * reserved_sections(sbi)); -} - static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi, int freed, int needed) { |