Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5959451ybi; Wed, 31 Jul 2019 06:07:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyujBl195Wbfbu2vJDPjYLAd6NoEZX1usIrIfgj9qm3/h1k/KCCFptSj8Hw+iTZGTFoPnx3 X-Received: by 2002:a63:db47:: with SMTP id x7mr113239054pgi.375.1564578447471; Wed, 31 Jul 2019 06:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564578447; cv=none; d=google.com; s=arc-20160816; b=M+YEBYG32f2Ui+10DFOkXJOl4cuMdTLk/RC/MA5HQ+RlZ7BEY4atISbCD5Iv5HFHxv kf2otxdmHIyFn2tlcDRX2WholfGLhwHqXojUcDF/COaijotZPbjjd91rx4aELbwLz5pw ADwqdB+fzyKJpf17P9756xwJka+8FazjDm2J0UAjIM3rbTDfsKR4+BCHkhC45v7IWm9+ rJ9SI+8v8/Xauab5XZdnK6uTYMnaRz8/5VnM9KbggcBJ8tRXAwYW6ygJjlVMUg1O+YwE EUlO8LgRma2KV3LNSrTZKMP39yEaKM7r50le9nOMyQa/lrxYMvy4H0HXHZxHAY1kcsrn sgGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=aIH+Ydqoki42EMLkFUoQ3CzWHL7RxkIYqpSyAOuljyQ=; b=zr+ZjHPF+PFQ4W77o7TJGU3L0474/kWB4G8G2+4e/tn4QnLPIDsQHdxeFFw6hEi83r bDuLLGWW5NycC1JcQfx0aox7KBeCMnoOsMf1dPhOXZLNsnW9jYtQcauwvp9XsqSWdZgk MLPJwk4J21Iw88wcqMtopvru7ya+J80ipo+p001inmS4J2LyknXLxfY7O/CfDDFVK5AR Mtj+6IVAlJBxwk4LS0nFso0nDFLPLVlGcAJgVwPMbkylxDz67nCpgOBtV5sGbunhUnBb mgd+D/tELIZG9L/CVVMCnBLmMi47Qm3FNRa+hkdR5f0FdRNK4CYqJc3nOH/D6T3mG1wE Wl4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si31833573pgc.244.2019.07.31.06.07.00; Wed, 31 Jul 2019 06:07:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388054AbfGaNGR (ORCPT + 99 others); Wed, 31 Jul 2019 09:06:17 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:36727 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387730AbfGaNGQ (ORCPT ); Wed, 31 Jul 2019 09:06:16 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=xiaoguang.wang@linux.alibaba.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---0TYGGpfj_1564578368; Received: from localhost(mailfrom:xiaoguang.wang@linux.alibaba.com fp:SMTPD_---0TYGGpfj_1564578368) by smtp.aliyun-inc.com(127.0.0.1); Wed, 31 Jul 2019 21:06:14 +0800 From: Xiaoguang Wang To: linux-ext4@vger.kernel.org Cc: Xiaoguang Wang Subject: [PATCH] ext4: disable mount with both dioread_nolock and nodelalloc Date: Wed, 31 Jul 2019 21:06:00 +0800 Message-Id: <20190731130600.7867-1-xiaoguang.wang@linux.alibaba.com> X-Mailer: git-send-email 2.17.2 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 --- 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