From: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
To: linux-ext4@vger.kernel.org
Cc: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Subject: [PATCH] ext4: disable mount with both dioread_nolock and nodelalloc
Date: Wed, 31 Jul 2019 21:06:00 +0800 [thread overview]
Message-ID: <20190731130600.7867-1-xiaoguang.wang@linux.alibaba.com> (raw)
Mount with both dioread_nolock and nodelalloc will result in huge
performance drop, which indeed is an known issue, so before we fix
this issue, currently we disable this behaviour. Below test reproducer
can reveal this performance drop.
mount -o remount,dioread_nolock,delalloc /dev/vdb1
rm -f testfile
start_time=$(date +%s)
dd if=/dev/zero of=testfile bs=4096 count=$((1024*256))
sync
end_time=$(date +%s)
echo $((end_time - start_time))
mount -o remount,dioread_nolock,nodelalloc /dev/vdb1
rm -f testfile
start_time=$(date +%s)
dd if=/dev/zero of=testfile bs=4096 count=$((1024*256))
sync
end_time=$(date +%s)
echo $((end_time - start_time))
Signed-off-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
---
fs/ext4/super.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4079605d437a..1a2b2c0cd1b8 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2098,6 +2098,12 @@ static int parse_options(char *options, struct super_block *sb,
int blocksize =
BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
+ if (!test_opt(sb, DELALLOC)) {
+ ext4_msg(sb, KERN_ERR, "can't mount with "
+ "both dioread_nolock and nodelalloc");
+ return 0;
+ }
+
if (blocksize < PAGE_SIZE) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"dioread_nolock if block size != PAGE_SIZE");
--
2.17.2
next reply other threads:[~2019-07-31 13:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 13:06 Xiaoguang Wang [this message]
2019-08-01 1:57 ` [PATCH] ext4: disable mount with both dioread_nolock and nodelalloc Joseph Qi
2019-09-02 1:31 ` Xiaoguang Wang
2019-09-07 16:00 ` Theodore Y. Ts'o
2019-09-09 3:40 ` Xiaoguang Wang
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=20190731130600.7867-1-xiaoguang.wang@linux.alibaba.com \
--to=xiaoguang.wang@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
/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).