From 0cc81b1ad51287847e494e055e5d3426f95e7921 Mon Sep 17 00:00:00 2001 From: Zhiguo Niu Date: Thu, 10 Aug 2023 16:40:00 +0800 Subject: [PATCH] f2fs: should update REQ_TIME for direct write The sending interval of discard and GC should also consider direct write requests; filesystem is not idle if there is direct write. Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ff5494c..047942d 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -4604,6 +4604,7 @@ static int f2fs_dio_write_end_io(struct kiocb *iocb, ssize_t size, int error, dec_page_count(sbi, F2FS_DIO_WRITE); if (error) return error; + f2fs_update_time(sbi, REQ_TIME); f2fs_update_iostat(sbi, NULL, APP_DIRECT_IO, size); return 0; } -- 2.7.4