]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
f2fs: atgc: fix to set default age threshold
authorChao Yu <yuchao0@huawei.com>
Tue, 11 May 2021 10:17:34 +0000 (18:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:17 +0000 (16:02 +0200)
[ Upstream commit 89e53ff1651a61cf2abef9356e2f60d0086215be ]

Default age threshold value is missed to set, fix it.

Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection")
Reported-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/gc.c

index a8567cb47621339578848a6e5b2ffb2822eec3a2..70d6047ffacfac2114fc6e6d1613634c627ed2cb 100644 (file)
@@ -1799,6 +1799,7 @@ static void init_atgc_management(struct f2fs_sb_info *sbi)
        am->candidate_ratio = DEF_GC_THREAD_CANDIDATE_RATIO;
        am->max_candidate_count = DEF_GC_THREAD_MAX_CANDIDATE_COUNT;
        am->age_weight = DEF_GC_THREAD_AGE_WEIGHT;
+       am->age_threshold = DEF_GC_THREAD_AGE_THRESHOLD;
 }
 
 void f2fs_build_gc_manager(struct f2fs_sb_info *sbi)