From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Theodore Ts'o <tytso@mit.edu>, Andreas Dilger <adilger@dilger.ca>,
Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, Dave Chinner <david@fromorbit.com>
Subject: [PATCH 2/3] Revert "ext4: fix off-by-one error when writing back pages before dio read"
Date: Tue, 27 Aug 2019 10:05:51 +0800 [thread overview]
Message-ID: <1566871552-60946-3-git-send-email-joseph.qi@linux.alibaba.com> (raw)
In-Reply-To: <1566871552-60946-1-git-send-email-joseph.qi@linux.alibaba.com>
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(-)
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,
--
1.8.3.1
next prev parent reply other threads:[~2019-08-27 2:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 2:05 [PATCH 0/3] Revert parallel dio reads Joseph Qi
2019-08-27 2:05 ` [PATCH 1/3] Revert "ext4: remove EXT4_STATE_DIOREAD_LOCK flag" Joseph Qi
2019-08-27 2:05 ` Joseph Qi [this message]
2019-08-27 2:05 ` [PATCH 3/3] Revert "ext4: Allow parallel DIO reads" Joseph Qi
2019-08-27 11:51 ` [PATCH 0/3] Revert parallel dio reads Dave Chinner
2019-08-29 10:58 ` Jan Kara
2019-08-29 19:06 ` Andreas Dilger
2019-08-30 15:35 ` Jan Kara
2019-09-10 14:10 ` Ritesh Harjani
2019-09-10 21:57 ` Jan Kara
2019-09-11 14:20 ` Ritesh Harjani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1566871552-60946-3-git-send-email-joseph.qi@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=adilger@dilger.ca \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).