Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2294165pxb; Wed, 9 Feb 2022 15:24:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpop4PfChlMpJg5oTpLsU/yX3FJSBzMjrg3U0QGPg71Q0yrSv9eup2yQBKb6f21sgXrmND X-Received: by 2002:a17:902:e788:: with SMTP id cp8mr4872926plb.172.1644449050231; Wed, 09 Feb 2022 15:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644449050; cv=none; d=google.com; s=arc-20160816; b=OrPIc5mh9uD0EVT97PfpcUfxSbD55a/vVt8wKzsFLLUeTuG7w0v7eRewMXqYhx2ZSU czjC++R/iWDsaPO7qtZdqiGDPpi1zDfuG9kKtuhO7LdfN0mKqXJM9iVcipQe24xML8N/ wv97UaXgaQ0JGLjKbixbOdtGUuKLgHB21dVTa4O/778qO7CQ9v4/YGsnTBDPRYa5mgiM r/bunziGjNitSWgTjasY3cRhftcsiDR9cktH2tiSAWzELANk0cWH+dCc14cQIzUpUF+p THNr4vddaMdCOey3smCvzurzGT80bFSOs6Fj/vSa3q2MhvP6ZJtrjyZslJRuhXs/xX+F lWrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mIhYcGZm+fgrIrFOoww5cSiLBZ2FKY2hw8SljEHNquA=; b=btEd+4hmvTgdv3l/0+yiek5rLnzjLAMb2HpRMpFIDOU5J5UbP9GKDlXOVPZiC0OV1j S0shb7YsRGePRuh05XbRuzjbu0hTgTaJ3jMZzlcq2fU/8XJuq8fVQmrejo/EN2nDoQZt 9logA8jw5gPglOtknIgIkt2iM4UuFxeD3vScDtmDrvvTU7bh15qZyoJ55a4vMQyormNz MGqFvRcWxS9/pMcEpclFM3YrMl/Nz4bDVEXcEet4Yrn1kp1oFR73FJcgyMw+GE9RUsXg Q/PBMHWO2u5vmdarpKui7DYoAtkUjcP9N0VmG3pYb51/74T++PIxtWRDiamQwhh/ukSF 3DVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HOMKSFwE; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r23si315183pls.138.2022.02.09.15.24.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 15:24:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HOMKSFwE; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43FA2E063C80; Wed, 9 Feb 2022 15:19:19 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235933AbiBIWb2 (ORCPT + 99 others); Wed, 9 Feb 2022 17:31:28 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:40074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235944AbiBIWbY (ORCPT ); Wed, 9 Feb 2022 17:31:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E4CBE018E69; Wed, 9 Feb 2022 14:31:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E5E3461C9A; Wed, 9 Feb 2022 22:31:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49778C340EB; Wed, 9 Feb 2022 22:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644445885; bh=bR4sxUvE7t7/jpuP5YfFYF8Jl/pDn3BISpVtXoqsgls=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HOMKSFwEU1krwHCm9g/ZmZ+B3M5POlN1cGehoE/AXmcb842yXuchumtanaMAoT8vR CFz1jES8lcBRJm8RXhm7vIFKPfi3Gan9SsrVIktgzGnVjvHIfGEjqM2vvkrKcJH9Y/ 6EvFxh99sh6HS3za91w0C8wbWRHdJ8Z2tlmo16NE4uN5ZX13fq6N9diGv5cXBEli5R YF0u0VdhiVU+/Kl2iwam5Yv3kHdO4HO3ArnQ5mLldbezGv+B+ZYffOFOyeK73H7ZtY dutGeVUpJPDe09I1Zwb4oDO+JmYkLk/g4i0PW1SLKgRxfZnJuwJy6rL32bcVsDbBUl DdlS3C7MauxcA== Date: Wed, 9 Feb 2022 14:31:24 -0800 From: "Darrick J. Wong" To: Shin'ichiro Kawasaki Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal Subject: Re: [PATCH v2 2/6] generic/204: remove unnecessary _scratch_mkfs call Message-ID: <20220209223124.GE8313@magnolia> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> <20220209123305.253038-3-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209123305.253038-3-shinichiro.kawasaki@wdc.com> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Wed, Feb 09, 2022 at 09:33:01PM +0900, Shin'ichiro Kawasaki wrote: > The test case generic/204 calls _scratch_mkfs to get data block size and > i-node size of the filesystem and obtained data block size is passed to > the following _scratch_mfks_sized call as an option. However, the > _scratch_mkfs call is unnecessary since the sizes can be obtained by > _scratch_mkfs_sized call without the data block size option. > > Also the _scratch_mkfs call is harmful when the _scratch_mkfs succeeds > and the _scratch_mkfs_sized fails. In this case, the _scratch_mkfs > leaves valid working filesystem on scratch device then following mount > and IO operations can not detect the failure of _scratch_mkfs_sized. > This results in the test case run with unexpected test condition. > > Hence, remove the _scratch_mkfs call and the data block size option for > _scratch_mkfs_sized call. > > Suggested-by: Darrick J. Wong > Signed-off-by: Shin'ichiro Kawasaki Looks ok, assuming you've verified that fstests with FSTYP=xfs doesn't regress... Reviewed-by: Darrick J. Wong --D > --- > tests/generic/204 | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/tests/generic/204 b/tests/generic/204 > index a3dabb71..a33a090f 100755 > --- a/tests/generic/204 > +++ b/tests/generic/204 > @@ -24,10 +24,6 @@ _supported_fs generic > > _require_scratch > > -# get the block size first > -_scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null > -. $tmp.mkfs > - > # For xfs, we need to handle the different default log sizes that different > # versions of mkfs create. All should be valid with a 16MB log, so use that. > # And v4/512 v5/1k xfs don't have enough free inodes, set imaxpct=50 at mkfs > @@ -35,7 +31,7 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null > [ $FSTYP = "xfs" ] && MKFS_OPTIONS="$MKFS_OPTIONS -l size=16m -i maxpct=50" > > SIZE=`expr 115 \* 1024 \* 1024` > -_scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw > +_scratch_mkfs_sized $SIZE 2> /dev/null > $tmp.mkfs.raw > cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null > _scratch_mount > > -- > 2.34.1 >