]> git.ipfire.org Git - thirdparty/linux.git/commit
f2fs: enable atgc dynamically if conditions are met
authorZhiguo Niu <zhiguo.niu@unisoc.com>
Fri, 7 Jun 2024 09:00:30 +0000 (17:00 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 18 Jun 2024 02:26:58 +0000 (02:26 +0000)
commit6efc3a05e6132812edf7eee0eb040eb88af34203
tree0802d177773ae0b43d3264cd1a52eb70bfb4c1eb
parent298b1e4182d657c3e388adcc29477904e9600ed5
f2fs: enable atgc dynamically if conditions are met

Now atgc can only be enabled when umounted->mounted device
even related conditions have reached. If the device has not
be umounted->mounted for a long time, atgc can not work.

So enable atgc dynamically when atgc_age_threshold is less than
elapsed_time and ATGC mount option is on.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c