diff options
author | Yunlong Song <yunlong.song@huawei.com> | 2017-09-04 11:10:18 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-09-05 10:52:28 -0700 |
commit | 2afce76a1151fe2f1104962c327d8f85047045e6 (patch) | |
tree | cff8789a4101b56806bb0cccc4a22a72429a4a5d /fs/f2fs | |
parent | f62fc9f97602d5f52fd574db80d95d71869bfe21 (diff) | |
download | linux-stable-2afce76a1151fe2f1104962c327d8f85047045e6.tar.gz linux-stable-2afce76a1151fe2f1104962c327d8f85047045e6.tar.bz2 linux-stable-2afce76a1151fe2f1104962c327d8f85047045e6.zip |
Revert "f2fs: add a new function get_ssr_cost"
This reverts commit b7b7c4cf1c9ef0272a65f1480457cbfdadcda19d.
se->ckpt_valid_blocks will never be smaller than se->valid_blocks, so just
remove get_ssr_cost.
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/gc.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index cd147e7c71e8..b226760afba8 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -277,20 +277,11 @@ static unsigned int get_greedy_cost(struct f2fs_sb_info *sbi, valid_blocks * 2 : valid_blocks; } -static unsigned int get_ssr_cost(struct f2fs_sb_info *sbi, - unsigned int segno) -{ - struct seg_entry *se = get_seg_entry(sbi, segno); - - return se->ckpt_valid_blocks > se->valid_blocks ? - se->ckpt_valid_blocks : se->valid_blocks; -} - static inline unsigned int get_gc_cost(struct f2fs_sb_info *sbi, unsigned int segno, struct victim_sel_policy *p) { if (p->alloc_mode == SSR) - return get_ssr_cost(sbi, segno); + return get_seg_entry(sbi, segno)->ckpt_valid_blocks; /* alloc_mode == LFS */ if (p->gc_mode == GC_GREEDY) |