diff options
author | Yangtao Li <frank.li@vivo.com> | 2022-11-23 19:44:01 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-11-28 23:50:58 +0300 |
commit | 1cd2e6d544359ae13e6fd9029b6018b957cf08c3 (patch) | |
tree | deb372d9a94ed93eb9de60c2283224d5e4d97223 /fs/f2fs/super.c | |
parent | 48c08c51f938d955dd8f5b8972bc29faa4c9556f (diff) | |
download | linux-1cd2e6d544359ae13e6fd9029b6018b957cf08c3.tar.xz |
f2fs: define MIN_DISCARD_GRANULARITY macro
Do cleanup in f2fs_tuning_parameters() and __init_discard_policy(),
let's use macro instead of number.
Suggested-by: Chao Yu <chao@kernel.org>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 31435c8645c8..daf14b55a972 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4080,7 +4080,8 @@ static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi) /* adjust parameters according to the volume size */ if (MAIN_SEGS(sbi) <= SMALL_VOLUME_SEGMENTS) { if (f2fs_block_unit_discard(sbi)) - SM_I(sbi)->dcc_info->discard_granularity = 1; + SM_I(sbi)->dcc_info->discard_granularity = + MIN_DISCARD_GRANULARITY; SM_I(sbi)->ipu_policy = 1 << F2FS_IPU_FORCE | 1 << F2FS_IPU_HONOR_OPU_WRITE; } |