Skip to content

Commit 332fade

Browse files
author
Jaegeuk Kim
committed
f2fs: allow parallel DIO reads
This fixes a regression which prevents parallel DIO reads. Fixes: 0cac511 ("f2fs: fix to avoid racing in between read and OPU dio write") Reviewed-by: Daeho Jeong <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 8cf0b93 commit 332fade

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/file.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4647,7 +4647,8 @@ static ssize_t f2fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
46474647
iov_iter_count(to), READ);
46484648

46494649
/* In LFS mode, if there is inflight dio, wait for its completion */
4650-
if (f2fs_lfs_mode(F2FS_I_SB(inode)))
4650+
if (f2fs_lfs_mode(F2FS_I_SB(inode)) &&
4651+
get_pages(F2FS_I_SB(inode), F2FS_DIO_WRITE))
46514652
inode_dio_wait(inode);
46524653

46534654
if (f2fs_should_use_dio(inode, iocb, to)) {

0 commit comments

Comments
 (0)