Skip to content

Commit

Permalink
f2fs: should update REQ_TIME for direct write
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhiguo Niu authored and Jaegeuk Kim committed Aug 14, 2023
1 parent eb61c2c commit 0cc81b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0cc81b1

Please sign in to comment.