mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
f2fs: cleanup for 'f2fs_tuning_parameters' function
A cleanup patch for 'f2fs_tuning_parameters' function. Signed-off-by: Yuwei Guan <Yuwei.Guan@zeekrlife.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
b7ad23cec2
commit
777cd95b80
1 changed files with 3 additions and 5 deletions
|
@ -4077,13 +4077,11 @@ static int f2fs_setup_casefold(struct f2fs_sb_info *sbi)
|
||||||
|
|
||||||
static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi)
|
static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi)
|
||||||
{
|
{
|
||||||
struct f2fs_sm_info *sm_i = SM_I(sbi);
|
|
||||||
|
|
||||||
/* adjust parameters according to the volume size */
|
/* adjust parameters according to the volume size */
|
||||||
if (sm_i->main_segments <= SMALL_VOLUME_SEGMENTS) {
|
if (MAIN_SEGS(sbi) <= SMALL_VOLUME_SEGMENTS) {
|
||||||
if (f2fs_block_unit_discard(sbi))
|
if (f2fs_block_unit_discard(sbi))
|
||||||
sm_i->dcc_info->discard_granularity = 1;
|
SM_I(sbi)->dcc_info->discard_granularity = 1;
|
||||||
sm_i->ipu_policy = 1 << F2FS_IPU_FORCE |
|
SM_I(sbi)->ipu_policy = 1 << F2FS_IPU_FORCE |
|
||||||
1 << F2FS_IPU_HONOR_OPU_WRITE;
|
1 << F2FS_IPU_HONOR_OPU_WRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue