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>
This commit is contained in:
Zhiguo Niu 2024-06-07 17:00:30 +08:00 • committed by Jaegeuk Kim
commit 6efc3a05e6
3 changed files with 26 additions and 3 deletions