diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-05-31 20:59:18 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-06-12 13:04:09 -0700 |
commit | 38b57833de1d9716bf8134c6fefcc35d23d5b136 (patch) | |
tree | f86a1c0c2bb9f0f37c7fa663c5ef84eba99597f1 | |
parent | 20872584b8c0b006c007da9588a272c9e28d2e18 (diff) | |
download | linux-stable-38b57833de1d9716bf8134c6fefcc35d23d5b136.tar.gz linux-stable-38b57833de1d9716bf8134c6fefcc35d23d5b136.tar.bz2 linux-stable-38b57833de1d9716bf8134c6fefcc35d23d5b136.zip |
f2fs: flag as supporting buffered async reads
The f2fs uses generic_file_buffered_read(), which supports buffered async
reads since commit 1a0a7853b901 ("mm: support async buffered reads in
generic_file_buffered_read()").
Let's enable it to match other file-systems. The read performance has been
greatly improved under io_uring:
167M/s -> 234M/s, Increase ratio by 40%
Test w/:
./fio --name=onessd --filename=/data/test/local/io_uring_test
--size=256M --rw=randread --bs=4k --direct=0 --overwrite=0
--numjobs=1 --iodepth=1 --time_based=0 --runtime=10
--ioengine=io_uring --registerfiles --fixedbufs
--gtod_reduce=1 --group_reporting --sqthread_poll=1
Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 015ed274dc31..23c68ee946e5 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -546,7 +546,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp) if (err) return err; - filp->f_mode |= FMODE_NOWAIT; + filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC; return dquot_file_open(inode, filp); } |