Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp338430imw; Fri, 8 Jul 2022 04:04:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vZtHbD8LrROAUGOhAXVdffFpGenLy1SYxzWVgZqkz8Uab59hKffvieRCIOGqlTUg7mbCc7 X-Received: by 2002:a05:6a00:3316:b0:528:c952:1a8e with SMTP id cq22-20020a056a00331600b00528c9521a8emr3191143pfb.21.1657278277331; Fri, 08 Jul 2022 04:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657278277; cv=none; d=google.com; s=arc-20160816; b=DEdDlbAum97pWd61aqWetFUXRO0JKbYv6dZxjsNBXGwmYBpFbGEDaw7kpi/9GTRlWg mC+mbS52yScZeCzHsrRsfcMnbfk7DgTDh/k588xGNVKrAKj8HUTWMGsbDq7EuaSwv5wW nQAdB+Hs/Otf2G3yetTlyzrpucP43S6hcS6xrHWA85M+BjtNsD5slpuyRwVHRunPfyuT bNRR6wTWCL+dywxy1w7dYEVMRWXNym9sBWr48FdlIIp5HWhri0EYJLHFgHjkMR+xDEu+ mQmOseichrwl7XNcD+HTUgaJYXtlsJoe93xpXl+6jd9WBR/d9AIr8v0n0VEbNmvbb0nn 09JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=BCea646Zcy+KA1pa2kIQj5HPHgFWmAEHEoscYZxPjDU=; b=aL2L5/Mv+5mgA6iYXFpmsU0NJWtWbCX6yGY/nZVxfF2jQX6XtQLY9OUs0wYMNmhgPV G2JGhHAWBx32hlcFJvqLSeYKtd3BY4hf0K+bGsgbuw10UBp6qJbnYbmLzcQaPjE9V3Gu 3ImG1Wzj28SXIqCS/PitS5s0I7tjA/l7+ej8HBzYoi8Q7laGKeFMOPsMwaxr53V3TCfA xBvFMz5ALPQLjk1gBkHPeEEWSPQyE1gWO8/sAO+0ycTe6VM4/lRSIbY5M2czfqUizVei TS6Ie03ypOiUlgC825zdC/J/HrndcaBkoYuq20AbKcBsbciMUUwbCm3nV+AlAgKteZeY 3O5w== 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 66-20020a630945000000b003c15242c486si59733998pgj.787.2022.07.08.04.04.02; Fri, 08 Jul 2022 04:04:37 -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 S238034AbiGHLDm (ORCPT + 99 others); Fri, 8 Jul 2022 07:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238006AbiGHLDj (ORCPT ); Fri, 8 Jul 2022 07:03:39 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC0FF642D; Fri, 8 Jul 2022 04:03:37 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4LfVjx5WdmzpWCP; Fri, 8 Jul 2022 19:02:45 +0800 (CST) Received: from kwepemm600010.china.huawei.com (7.193.23.86) by dggemv703-chm.china.huawei.com (10.3.19.46) 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:03:35 +0800 Received: from [10.174.178.31] (10.174.178.31) 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:03:35 +0800 Subject: Re: [PATCH 2/2] ext4/058: set 256 blocks in a block group Set 256 blocks in a block group To: Zorro Lang CC: , References: <20220707135917.373342-1-sunke32@huawei.com> <20220707135917.373342-3-sunke32@huawei.com> <20220707151833.72ggvyxjzz2e42kh@zlang-mailbox> From: Sun Ke Message-ID: <5b019cf0-02ee-b7b8-9f08-b48e96ac74e8@huawei.com> Date: Fri, 8 Jul 2022 19:03:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20220707151833.72ggvyxjzz2e42kh@zlang-mailbox> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.31] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) 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,NICE_REPLY_A, 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 Thanks for your suggestions, I will improve them in v2. ?? 2022/7/7 23:18, Zorro Lang ะด??: > On Thu, Jul 07, 2022 at 09:59:17PM +0800, Sun Ke wrote: >> 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 >> --- > > About the subject: > "ext4/058: set 256 blocks in a block group Set 256 blocks in a block group" > > Don't use a fixed number for new case, you can use "ext4: ...". And I can't > understand the meaning of this subject, except you say it's a duplicate :) > > >> tests/ext4/058 | 37 +++++++++++++++++++++++++++++++++++++ >> tests/ext4/058.out | 2 ++ >> 2 files changed, 39 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..dc7903b7 >> --- /dev/null >> +++ b/tests/ext4/058 >> @@ -0,0 +1,37 @@ >> +#! /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 >> + >> +# Modify as appropriate. > ^^^ > > This's comment can be removed. > >> +_supported_fs generic > > If it's a ext4 specific test case, don't use "generic" at here. > > And _fixed_by_kernel_commit() is recommend. > >> +_require_scratch >> +_require_command "$KILLALL_PROG" killall >> + >> +# set 256 blocks in a block group >> +MKFS_OPTIONS="-g 256" >> +_scratch_mkfs >>$seqres.full 2>&1 > > I think > _scratch_mkfs_ext4 -g 256 >>$seqres.full 2>&1 > is enough. Does other mkfs options will affect this testing? > > Or make sure mkfs passed: > _scratch_mkfs -g 256 >>$seqres.full 2>&1 || _fail "mkfs failed" > >> +_scratch_mount >> + >> +$FSSTRESS_PROG -d $SCRATCH_MNT -n 1000 -p 1 >> $seqres.full 2>&1 & > > Is "-p 1" necessary? > >> +sleep 3 >> +$KILLALL_PROG -q $FSSTRESS_PROG >> +wait > > Hmm.... one more background fsstress test case again ... if so, you need to make > sure the fsstress processes be killed in _cleanup(). Please refer to other cases. > > Besides that, I'm wondering if you really need to run fsstress in background? > Due to from the code logic, you run and kill it directly, then do nothing. > What special reason cause you have to run fsstress as that? > > Thanks, > Zorro > >> + >> +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 >> > > . >