f2fs: export SSR allocation threshold
This patch exports min_ssr_segments threshold in sysfs to let user control triggering SSR allocation flexibly. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -181,7 +181,7 @@ bool need_SSR(struct f2fs_sb_info *sbi)
|
||||
return true;
|
||||
|
||||
return free_sections(sbi) <= (node_secs + 2 * dent_secs + imeta_secs +
|
||||
2 * reserved_sections(sbi));
|
||||
SM_I(sbi)->min_ssr_sections + reserved_sections(sbi));
|
||||
}
|
||||
|
||||
void register_inmem_page(struct inode *inode, struct page *page)
|
||||
@@ -3671,6 +3671,7 @@ int build_segment_manager(struct f2fs_sb_info *sbi)
|
||||
sm_info->min_ipu_util = DEF_MIN_IPU_UTIL;
|
||||
sm_info->min_fsync_blocks = DEF_MIN_FSYNC_BLOCKS;
|
||||
sm_info->min_hot_blocks = DEF_MIN_HOT_BLOCKS;
|
||||
sm_info->min_ssr_sections = reserved_sections(sbi);
|
||||
|
||||
sm_info->trim_sections = DEF_BATCHED_TRIM_SECTIONS;
|
||||
|
||||
|
Reference in New Issue
Block a user