Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp347665imw; Fri, 8 Jul 2022 04:13:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1smqy9MATCtiNlVnP9GORh9cv89+Q+hT5F3yBqILJpRZjJgqm3HlFWSPlX9YqLbdCOBktWe X-Received: by 2002:a17:90a:ba04:b0:1ee:e6b0:edff with SMTP id s4-20020a17090aba0400b001eee6b0edffmr3457143pjr.153.1657278807670; Fri, 08 Jul 2022 04:13:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657278807; cv=none; d=google.com; s=arc-20160816; b=sgLBiWtDiqP8BPsJ5xBVCWPhk6FaLVSE9vHhJEdW9sRM92yLynFctg7LCeg2VyjFG0 YuV6alNQEtBm+AiMPcfMO1KySQrbPeGbxA5cJK5G0ATLQtcaMPSk18nbPMhRYey3sYEM 4IJQRnNJih8f35JNe9MsrpYO9VHAXJzCGb6iErkUGXcMinjGMYM1UJXmjItG42H0n4rw 3gbpPX53vxv/mOcaPxqIZVZQOKUxKC0OC9pTpWsXJXlalP+EYRzLZU2WQQhlNclDLGNe 5+U9LKXP6BRVzaKSTt/xGin6YeuzY12oxpcXbiAugb5gRCD8MQ9roqBoltiO4K/Yrtps vVTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=e9zHR8HrZZu1uOK1rPivyw9j2mxkVyEbyOiKk7PB9O8=; b=SBOvhMif96qwhbPmpK+k4E+moqNwTdFeP95kGY6Hx75cm4sAJQtNOgrLdzIThFwRxj lDygnR3Dii2Y0q9GytgPjHqThEug61FqkniLjQxLjIHm6wAewPhI/BBeFbAGA2yA9a/g KKdU8Oz9Vz77KnSNetV3+P+XPCP3beD5PleLgZpLFMfzp7ejuCWwbG5gvG4gIi2e/bUx qMwDybl2Uk1qfdx74NHMz7CfYPv5aAyCpVATJEmS2b344KVNqKZOU6I+AKxg01NtL1K1 4pOkpEw+w0cZRUTh5PYiliPruj6g5QpAq4pGOwfOL3Na0HzljLlgItArhmLP0k4EaQyj R8Pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170902e94e00b00163b98f6047si25489072pll.116.2022.07.08.04.12.59; Fri, 08 Jul 2022 04:13:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237789AbiGHLJa (ORCPT + 99 others); Fri, 8 Jul 2022 07:09:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237724AbiGHLJ3 (ORCPT ); Fri, 8 Jul 2022 07:09:29 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F9C5804B8; Fri, 8 Jul 2022 04:09:29 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LfVpq0wJPz1L9W0; Fri, 8 Jul 2022 19:06:59 +0800 (CST) Received: from kwepemm600010.china.huawei.com (7.193.23.86) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 8 Jul 2022 19:09:27 +0800 Received: from huawei.com (10.175.127.227) by kwepemm600010.china.huawei.com (7.193.23.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 8 Jul 2022 19:09:26 +0800 From: Sun Ke To: CC: , , Subject: [PATCH v2 2/2] ext4: set 256 blocks in a block group then apply io pressure Date: Fri, 8 Jul 2022 19:21:55 +0800 Message-ID: <20220708112155.2639551-3-sunke32@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220708112155.2639551-1-sunke32@huawei.com> References: <20220708112155.2639551-1-sunke32@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600010.china.huawei.com (7.193.23.86) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Set 256 blocks in a block group, then inject I/O pressure, it will trigger off kernel BUG in ext4_mb_mark_diskspace_used. Regression test for commit a08f789d2ab5 ext4: fix bug_on ext4_mb_use_inode_pa. Signed-off-by: Sun Ke --- tests/ext4/058 | 33 +++++++++++++++++++++++++++++++++ tests/ext4/058.out | 2 ++ 2 files changed, 35 insertions(+) create mode 100755 tests/ext4/058 create mode 100644 tests/ext4/058.out diff --git a/tests/ext4/058 b/tests/ext4/058 new file mode 100755 index 00000000..b718c1ac --- /dev/null +++ b/tests/ext4/058 @@ -0,0 +1,33 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 HUAWEI. All Rights Reserved. +# +# FS QA Test 058 +# +# Set 256 blocks in a block group, then inject I/O pressure, +# it will trigger off kernel BUG in ext4_mb_mark_diskspace_used +# +# Regression test for commit +# a08f789d2ab5 ext4: fix bug_on ext4_mb_use_inode_pa +# +. ./common/preamble +_begin_fstest auto + +# real QA test starts here + +_supported_fs ext4 +_fixed_by_kernel_commit a08f789d2ab5 \ + "ext4: fix bug_on ext4_mb_use_inode_pa" +_require_scratch + +# set 256 blocks in a block group +_scratch_mkfs -g 256 >>$seqres.full 2>&1 || _fail "mkfs failed" +_scratch_mount + +$FSSTRESS_PROG -d $SCRATCH_MNT/stress -n 1000 >> $seqres.full + +echo "Silence is golden" + +# success, all done +status=0 +exit diff --git a/tests/ext4/058.out b/tests/ext4/058.out new file mode 100644 index 00000000..fb5ca60b --- /dev/null +++ b/tests/ext4/058.out @@ -0,0 +1,2 @@ +QA output created by 058 +Silence is golden -- 2.13.6