diff options
author | 2022-11-24 00:44:01 +0800 | |
---|---|---|
committer | 2022-11-28 12:50:58 -0800 | |
commit | 1cd2e6d544359ae13e6fd9029b6018b957cf08c3 (patch) | |
tree | deb372d9a94ed93eb9de60c2283224d5e4d97223 /fs/f2fs/super.c | |
parent | f2fs: init discard policy after thread wakeup (diff) | |
download | linux-1cd2e6d544359ae13e6fd9029b6018b957cf08c3.tar.gz linux-1cd2e6d544359ae13e6fd9029b6018b957cf08c3.tar.bz2 linux-1cd2e6d544359ae13e6fd9029b6018b957cf08c3.zip |
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; } |