f2fs: change reclaim rate in percentage
It is more reasonable to determine the reclaiming rate of prefree segments according to the volume size, which is set to 5% by default. For example, if the volume is 128GB, the prefree segments are reclaimed when the number reaches to 6.4GB. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
@@ -1758,7 +1758,8 @@ int build_segment_manager(struct f2fs_sb_info *sbi)
|
||||
sm_info->ovp_segments = le32_to_cpu(ckpt->overprov_segment_count);
|
||||
sm_info->main_segments = le32_to_cpu(raw_super->segment_count_main);
|
||||
sm_info->ssa_blkaddr = le32_to_cpu(raw_super->ssa_blkaddr);
|
||||
sm_info->rec_prefree_segments = DEF_RECLAIM_PREFREE_SEGMENTS;
|
||||
sm_info->rec_prefree_segments = sm_info->main_segments *
|
||||
DEF_RECLAIM_PREFREE_SEGMENTS / 100;
|
||||
sm_info->ipu_policy = F2FS_IPU_DISABLE;
|
||||
sm_info->min_ipu_util = DEF_MIN_IPU_UTIL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user