diff options
author | DongDongJu <commisori28@gmail.com> | 2020-03-20 09:01:32 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-03-31 06:46:23 +0300 |
commit | ad8d6a02d685ecf046c369d72285a5e69adaf66e (patch) | |
tree | 991eeb86b5b95374a30e2849cea37fbaf94c1672 | |
parent | 530e07042002f8c2893bab83d63e10f2750a4d50 (diff) | |
download | linux-ad8d6a02d685ecf046c369d72285a5e69adaf66e.tar.xz |
f2fs: delete DIO read lock
This lock can be a contention with multi 4k random read IO with single inode.
example) fio --output=test --name=test --numjobs=60 --filename=/media/samsung960pro/file_test --rw=randread --bs=4k
--direct=1 --time_based --runtime=7 --ioengine=libaio --iodepth=256 --group_reporting --size=10G
With this commit, it remove that possible lock contention.
Signed-off-by: Dongjoo Seo <commisori28@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index dbde309349d0..326e6342c578 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3453,7 +3453,8 @@ static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) err = __blockdev_direct_IO(iocb, inode, inode->i_sb->s_bdev, iter, rw == WRITE ? get_data_block_dio_write : get_data_block_dio, NULL, f2fs_dio_submit_bio, - DIO_LOCKING | DIO_SKIP_HOLES); + rw == WRITE ? DIO_LOCKING | DIO_SKIP_HOLES : + DIO_SKIP_HOLES); if (do_opu) up_read(&fi->i_gc_rwsem[READ]); |