diff options
author | Zhiguo Niu <zhiguo.niu@unisoc.com> | 2024-06-07 11:00:30 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-06-18 04:26:58 +0200 |
commit | 6efc3a05e6132812edf7eee0eb040eb88af34203 (patch) | |
tree | 0802d177773ae0b43d3264cd1a52eb70bfb4c1eb /fs/f2fs/checkpoint.c | |
parent | f2fs: fix to truncate preallocated blocks in f2fs_file_open() (diff) | |
download | linux-6efc3a05e6132812edf7eee0eb040eb88af34203.tar.xz linux-6efc3a05e6132812edf7eee0eb040eb88af34203.zip |
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>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 55d444bec5c0..7cfe4e01dd7e 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1718,6 +1718,7 @@ int f2fs_write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) } f2fs_restore_inmem_curseg(sbi); + f2fs_reinit_atgc_curseg(sbi); stat_inc_cp_count(sbi); stop: unblock_operations(sbi); |