Skip to content

Commit 38b5783

Browse files
bbkzzJaegeuk Kim
authored andcommitted
f2fs: flag as supporting buffered async reads
The f2fs uses generic_file_buffered_read(), which supports buffered async reads since commit 1a0a785 ("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>
1 parent 2087258 commit 38b5783

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/f2fs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp)
546546
if (err)
547547
return err;
548548

549-
filp->f_mode |= FMODE_NOWAIT;
549+
filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
550550

551551
return dquot_file_open(inode, filp);
552552
}

0 commit comments

Comments
 (0)