[2/3] Revert "ext4: fix off-by-one error when writing back pages before dio read"
diff mbox series

Message ID 1566871552-60946-3-git-send-email-joseph.qi@linux.alibaba.com
State New
Headers show
Series
  • Revert parallel dio reads
Related show

Commit Message

Joseph Qi Aug. 27, 2019, 2:05 a.m. UTC
This reverts commit e5465795cac4 ("ext4: fix off-by-one error when
writing back pages before dio read").
It is related to the following revert 16c54688592c ("ext4: Allow
parallel DIO reads") which causes significant performance regression in
mixed random read/write scenario.

Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0f505f0..16077ec 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3875,7 +3875,7 @@  static ssize_t ext4_direct_IO_read(struct kiocb *iocb, struct iov_iter *iter)
 	 */
 	inode_lock_shared(inode);
 	ret = filemap_write_and_wait_range(mapping, iocb->ki_pos,
-					   iocb->ki_pos + count - 1);
+					   iocb->ki_pos + count);
 	if (ret)
 		goto out_unlock;
 	ret = __blockdev_direct_IO(iocb, inode, inode->i_sb->s_bdev,