summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhiguo Niu <zhiguo.niu@unisoc.com>2023-08-10 16:40:00 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2023-08-14 13:42:28 -0700
commit0cc81b1ad51287847e494e055e5d3426f95e7921 (patch)
tree30fed898330501fadcfa72a5b33f633fb6fd2e5a
parenteb61c2cca2eb2110cc7b61a7bc15b3850977a778 (diff)
downloadlinux-0cc81b1ad51287847e494e055e5d3426f95e7921.tar.gz
linux-0cc81b1ad51287847e494e055e5d3426f95e7921.tar.bz2
linux-0cc81b1ad51287847e494e055e5d3426f95e7921.zip
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 <zhiguo.niu@unisoc.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index ff5494c255f6..047942d2ec5d 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;
}