From patchwork Fri Feb 18 07:31:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12751023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B67BC43217 for ; Fri, 18 Feb 2022 07:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230221AbiBRHcS (ORCPT ); Fri, 18 Feb 2022 02:32:18 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232047AbiBRHcQ (ORCPT ); Fri, 18 Feb 2022 02:32:16 -0500 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9D3328ADBC; Thu, 17 Feb 2022 23:32:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1645169520; x=1676705520; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X0cJo/gEUSWY7GFbHe4x4WW3rcISwkhA4qYARZRTXL0=; b=ZL3dy/r8JGmcFtpayRC0BOzIhR+zfSFFtJB9PoCjkzJz9DfbQS8zNzE0 qaq3srsTpqfe8zyzi3+oJpO+lSVfupjQGiortPoTm5JhqKHtjifEOE+eX 8PxFNz4RLRB41BbfLGHzz/80LFOQn404mbBoOMIn2wXbd7994hXzFzXNJ 99PZhaTs0Yt/Ayt+DWVLabcJBGCUb8QW2JsW3rinaV1Simxdk7GBwl0CR ZCI1FAHxz+Nveorkpwee73oExh4AvZEZTixNAE6UxOIb/gYpam6IajhBZ GiCKz5yr1F3wLzjRVSTPCYWrcVjhmKb7TrhDCkbhcS4QdkxxeggpZGf3K A==; X-IronPort-AV: E=Sophos;i="5.88,378,1635177600"; d="scan'208";a="193264892" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Feb 2022 15:32:00 +0800 IronPort-SDR: 7YTibtaoh4ygGH3r9wYDZbSHbSe83m01b9+17knxqQDu2GYTFNxz+5jCLr+y1MNrsrYU1NBojI 0UfTgkT4U15VY6MF0uinHAbCNokwIYqqOU3H8JlA3LTVKNrGNQDdbKT8QYiBZJgHK0wgJiM3UB kb9KipSWi5SwGNKXIrd/u+Sp1gsqyxFAQL3m34ToOgWWm4Vly79X9o7QWtmujVFyx8LYhVOTmM zNFBe1Znz6HPykWTTMaBHYCJtTZAqwmCxmMxrZH0i1I3KaFfZED3XosMP4TXkJPdVEN2QEtPGX hseRUtLEJLCpTWRmG1AwopXc Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 23:04:45 -0800 IronPort-SDR: lKFR5aoeC6jbqVv67g4GuRn7VTZCiHUnuouSVgkA4977nFObGZTRmZ+RF8aHxykDk94eG5kLKL tkR9vL17WCb6LmIE0dAElFOo85IDizqY2u7v4Zz9Md4Vx4tv8Dax7zK8vVo4Rqi3E3XONQHbPM 0s5Vp3rv3FSl9LMzMbmuGUKqtB9CHK1gbWm23OJ+mKFMZb3XTqBJ/4B74vFrH2laDMX6+NzuQX 8edsfz3K+I7qVYaUlE3CnsGOh5zv3ZV9uE3q0xQ8QJ3DTGh96Rf8SOQMjGx1oQ+OETk/RGEXqj gi4= WDCIronportException: Internal Received: from shindev.dhcp.fujisawa.hgst.com (HELO shindev.fujisawa.hgst.com) ([10.149.52.173]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Feb 2022 23:31:59 -0800 From: Shin'ichiro Kawasaki To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal , Shin'ichiro Kawasaki Subject: [PATCH v3 1/6] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized Date: Fri, 18 Feb 2022 16:31:51 +0900 Message-Id: <20220218073156.2179803-2-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> References: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The helper function _scratch_mkfs_sized needs a couple of improvements for btrfs. At first, the function adds --mixed option to mkfs.btrfs when the filesystem size is smaller then 256MiB, but this threshold is no longer correct and it should be 109MiB. Secondly, the --mixed option shall not be specified to mkfs.btrfs for zoned devices, since zoned devices does not allow mixing metadata blocks and data blocks. Suggested-by: Naohiro Aota Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Johannes Thumshirn --- common/rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/rc b/common/rc index de60fb7b..74d2d8bd 100644 --- a/common/rc +++ b/common/rc @@ -1075,10 +1075,10 @@ _scratch_mkfs_sized() ;; btrfs) local mixed_opt= - # minimum size that's needed without the mixed option. - # Ref: btrfs-prog: btrfs_min_dev_size() - # Non mixed mode is also the default option. - (( fssize < $((256 * 1024 *1024)) )) && mixed_opt='--mixed' + # Mixed option is required when the filesystem size is small and + # the device is not zoned. Ref: btrfs-progs: btrfs_min_dev_size() + (( fssize < $((109 * 1024 * 1024)) )) && + ! _scratch_btrfs_is_zoned && mixed_opt='--mixed' $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV ;; jfs) From patchwork Fri Feb 18 07:31:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12751024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18990C4167D for ; Fri, 18 Feb 2022 07:32:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232062AbiBRHcU (ORCPT ); Fri, 18 Feb 2022 02:32:20 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbiBRHcR (ORCPT ); Fri, 18 Feb 2022 02:32:17 -0500 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16EBA28BF5F; Thu, 17 Feb 2022 23:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1645169521; x=1676705521; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QZPP2eUD6LmrIngJtxiooxFOTZ0FEikLbY04VUf8kXE=; b=IBnF9cHAlY7SLTLBQIKko5JZRuyCuF2u75Oft8EUEoTEJ/Thsw8rGBek GYKzI3V+SxSnIAciXGe99NMZWnJgwu52IWOT0VW0Mj1UtINPouU91yrwJ Dwc76T1AmaY5u77dNEgQ15e/4Pcmb3a1asH2dqEsQbQ9QjqU6GrT4Pphh +oBvQRNjNxVJiGOczVGp8xSbqkO2n8ca7uU54BFq9ptffWGTpVGXkoMp1 /suKMh89L1Qz3Fr1OrGflGDYIVEhNZlWIRiibgMv+bvnkKKpv+t1pixmm 9c47zcJX+wlAX0Ni3Hg0YLG5AUNQ/3LEaIr6czj37q5yA38PeNS53cR2Z w==; X-IronPort-AV: E=Sophos;i="5.88,378,1635177600"; d="scan'208";a="193264897" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Feb 2022 15:32:01 +0800 IronPort-SDR: PoY3yc0/gkJlLJ2BTlH5WRYI1J6OqlCC+mdnslJ3H4RpDuzGSwsfcWMF+OxdPf3zGW5ROv0P5C 8+xXy2Qi7gElrbVI7HSB9nmUNlBZST/EMVZuoXuyOJwyBwBcZQY7TivH+93nOpYwo8r2kRLN6s /8eoX9/bvJJP8PlHJmurYjcyGIzxf3kRVW6tWtTAWQflO/Bvuk/EDHhUCEaO1kvs9zLlXyoPcE b963t2qvCSpcwpjhxR/ro+M2nxnUNTGN54uF3HeeBnqdnxgwvQXIGTMt3dWDeA83aBygPRBDiT RZwiyg1amtWYN8Tyc3KL6ahU Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 23:04:46 -0800 IronPort-SDR: qOXg3z9g5tkTtWbH0M+gC5EoIsS/btGA2ULv3bjrM45Ezc8OtZDH/jd4BLW4eAizrLIJsbuk+X fUnDgb34oiVMUs1hqJWNNrXZKPLo8yScBNHp5u4iH9RHgvr5ctCRnr0t1yvAIGEwDcH3NtZ9wg G/meH011EmE3FQUJI6VYjcUxdXt3BznYrsWkIUoxHc3SIY+PrQNyBFsaw0O/+wL+iKCJH2UAlN YbU3HEAv9sjgTQEsL/KvYbmbXWZduMb/2wtsWwFOLkMmr4ID2gsx84S8Jk3ixwzPgRG18D/BfW fO8= WDCIronportException: Internal Received: from shindev.dhcp.fujisawa.hgst.com (HELO shindev.fujisawa.hgst.com) ([10.149.52.173]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Feb 2022 23:32:01 -0800 From: Shin'ichiro Kawasaki To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal , Shin'ichiro Kawasaki Subject: [PATCH v3 2/6] generic/204: remove unnecessary _scratch_mkfs call Date: Fri, 18 Feb 2022 16:31:52 +0900 Message-Id: <20220218073156.2179803-3-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> References: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org 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 Reviewed-by: Darrick J. Wong --- 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 From patchwork Fri Feb 18 07:31:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12751025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C12AC4332F for ; Fri, 18 Feb 2022 07:32:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232054AbiBRHcU (ORCPT ); Fri, 18 Feb 2022 02:32:20 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232060AbiBRHcT (ORCPT ); Fri, 18 Feb 2022 02:32:19 -0500 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC91C28D3B0; Thu, 17 Feb 2022 23:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1645169523; x=1676705523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KEuWIoMVLJ58HRVAmVtsxGEysPraVNqGHgTji0wI3VQ=; b=iLOT3wsFR0lG/oykmKV65j+Z0tbSp+W1vsquDSs7yVKFcahdjWcNiOMJ x9cBC4SisCjFpyX52wBZ04z7JBgjYXjYaLeumVIUb7FvJpubwqjH4FsRn 61NvA/x3OatECB69ngNhFPrpEZY3106yNY6oyhEQ92Y/iVVmBek4PKstm ym56fu5x4+9cD0yxAm7STb0MxWDTwjhJokdkt10ajyucXTQvrGcs9p7b4 YhClNsNV9JFwN+YVDytJXbh3JyLOvMAPnxyHDkRebAQ0CREZzb6iTLFvh YsuRzv9hZdVaxWWBnWPzdzbuEEQ4MsGkQ5Y37fPkO3XFJNMZY5EoqXrkn A==; X-IronPort-AV: E=Sophos;i="5.88,378,1635177600"; d="scan'208";a="193264901" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Feb 2022 15:32:03 +0800 IronPort-SDR: gS3wxDTgaxZx8AHPP+Urf2h2eYQdN0UuSZPKSWFUwQPUXjCJmJSSOaMbWEc3fpi368eEr8pB5D 1EbjVF23w5/aZfXdI79ZdeSFsaJAqkKT1m/nG/Ss5+wlu80xPPa96NZ4BPA3qoWbaS9NNzzHxy 7LRPJL4xzlR/XEkcDrUAAMjL2Olb36aq39p30i1S1Vjk3DC/wBorRHVJjApyJ8kVEPfcxLJXeR /rXvSTfhlstEHrixxOPdf+dAx5vfFP8ZLBVQR+5H9ooX7NRGYbSX5scNsdwfcZns7y3WpyRodG KLE0xgXxu889HTgw+icN86Xk Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 23:04:48 -0800 IronPort-SDR: f8Y1hGD4Ilmy1jzsREBseRt646DjALD1/hbFiLzYp6G9dSf37GE7cinxL7lcY6uvmVJBMPY3Cn Jd3Dxt+3C4lBZCaq/xyIlePQqiXx+upBrtb/9atEdD+BWTq+oMX5VrogENmoNKng3xEKsFTmu5 aD+9WdGt9zotnTSl7W/hEOpINuIG5E2Irwo1A0HNP5HwvV1rVnNg8ST/lX5KClafbfyrKvroD1 5cs1IyJSbN+yTW3HEUEFq/EMiJ95h4yz1cnxMwBlWV35qnXTeXch4y3a7Wy9mBvIH9Fk3b6se2 7kg= WDCIronportException: Internal Received: from shindev.dhcp.fujisawa.hgst.com (HELO shindev.fujisawa.hgst.com) ([10.149.52.173]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Feb 2022 23:32:02 -0800 From: Shin'ichiro Kawasaki To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal , Shin'ichiro Kawasaki Subject: [PATCH v3 3/6] generic/{171,172,173,174}: check _scratch_mkfs_sized return code Date: Fri, 18 Feb 2022 16:31:53 +0900 Message-Id: <20220218073156.2179803-4-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> References: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The test cases generic/{171,172,173,174} call _scratch_mkfs before _scratch_mkfs_sized, and they do not check return code of _scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount after it cannot detect the sized mkfs failure because _scratch_mkfs already created a file system on the device. This results in unexpected test condition of the test cases. To avoid the unexpected test condition, check return code of _scratch_mkfs_sized in the test cases. Suggested-by: Naohiro Aota Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Darrick J. Wong --- tests/generic/171 | 2 +- tests/generic/172 | 2 +- tests/generic/173 | 2 +- tests/generic/174 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/generic/171 b/tests/generic/171 index fb2a6f14..f823a454 100755 --- a/tests/generic/171 +++ b/tests/generic/171 @@ -42,7 +42,7 @@ sz_bytes=$((nr_blks * 8 * blksz)) if [ $sz_bytes -lt $((32 * 1048576)) ]; then sz_bytes=$((32 * 1048576)) fi -_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 +_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed" _scratch_mount >> $seqres.full 2>&1 rm -rf $testdir mkdir $testdir diff --git a/tests/generic/172 b/tests/generic/172 index ab5122fa..383824b9 100755 --- a/tests/generic/172 +++ b/tests/generic/172 @@ -40,7 +40,7 @@ umount $SCRATCH_MNT file_size=$((768 * 1024 * 1024)) fs_size=$((1024 * 1024 * 1024)) -_scratch_mkfs_sized $fs_size >> $seqres.full 2>&1 +_scratch_mkfs_sized $fs_size >> $seqres.full 2>&1 || _fail "mkfs failed" _scratch_mount >> $seqres.full 2>&1 rm -rf $testdir mkdir $testdir diff --git a/tests/generic/173 b/tests/generic/173 index 0eb313e2..e1493278 100755 --- a/tests/generic/173 +++ b/tests/generic/173 @@ -42,7 +42,7 @@ sz_bytes=$((nr_blks * 8 * blksz)) if [ $sz_bytes -lt $((32 * 1048576)) ]; then sz_bytes=$((32 * 1048576)) fi -_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 +_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed" _scratch_mount >> $seqres.full 2>&1 rm -rf $testdir mkdir $testdir diff --git a/tests/generic/174 b/tests/generic/174 index 1505453e..c7a177b8 100755 --- a/tests/generic/174 +++ b/tests/generic/174 @@ -43,7 +43,7 @@ sz_bytes=$((nr_blks * 8 * blksz)) if [ $sz_bytes -lt $((32 * 1048576)) ]; then sz_bytes=$((32 * 1048576)) fi -_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 +_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed" _scratch_mount >> $seqres.full 2>&1 rm -rf $testdir mkdir $testdir From patchwork Fri Feb 18 07:31:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12751026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E98BC433FE for ; Fri, 18 Feb 2022 07:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232060AbiBRHc1 (ORCPT ); Fri, 18 Feb 2022 02:32:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232047AbiBRHcV (ORCPT ); Fri, 18 Feb 2022 02:32:21 -0500 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B90F28F944; Thu, 17 Feb 2022 23:32:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1645169525; x=1676705525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9Pd3b/9swSzNUyD5TIAVg8N6r2sO8Uzr5oqo/2Aj3v4=; b=e9R1vVLsF6KKp3IXMAF0e2SECXqYXLuqo9qHKk0ZMTrbaaJyZLLVDKjf Nx71ilMfrOUykoGK7slkYCIQ1yJznze2LV8Z/4DZc8Z4HFnr5aEnUWsDq XsdYOU6Qt2yHIUiOergRg2I2Gasx1mNrdNuuNVP1JwcxK77u6mePXWVY3 y2QB/sR6SW/b+68ydqSGBgOR58PjG9Hfg1Z0OYzAHWLFU97hQjHLLoT+f 4Hk/FSPAQHcwoOjHt2MhBpR+KduCmkAO+vKfaqfE+p3yDZnSqdLPR0cyY hJYo57JJOvUINk0FFZQOWopPAI2lu1WEaAx8Ql/pjjoe75sUvgiKC2Ko2 Q==; X-IronPort-AV: E=Sophos;i="5.88,378,1635177600"; d="scan'208";a="193264907" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Feb 2022 15:32:04 +0800 IronPort-SDR: DyAerbA+Rp8fQejIqqC+moeaB5xhABY2Gqu686kDMrOhTfv4J2Pe0qvtTxoqPgKk3/uJ0XoQ5h euE6yXnYyHmmf3vakYglvJ+c30e/iUF//conKB33+IRL6kzcJGT77ImkwPZ2IF0kRfCFlLby6S DCI/Z37+pyQ84W902s3wQtra+lG0Cjcs0/SHXBAVVOj6ykLWCuCJUNFtYtgzKhj7fhhFNIpw09 ARnZsuGZbMfbdmP78r/SHIQKBE4sKIW3SNqDr+KnFmo4sBkBXjI5ka07hJMiYq2z/iIG8J3o/y yYh5OCTWc9PWshgIlCYXi6gj Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 23:04:50 -0800 IronPort-SDR: AACecmJwVv9CFdEW/k5e2nFX6/PFjDjibsPKU58qvf1d5wHHSiQp/0D6deeFSMdmyakMHQdpXb 8TA2ppbnCjfCr3sPw3E8jqgd401t+OGsZLfO/0vc4R0ZVQbdRaDKBAHY9KmPfDi47+Rcv14zlb WM/973JWOZHVRwJ70+q772RdZL8UKocSBH9mTz/OLHzAxQ+2tiEVjobrmiEsnteScXYAkaw2UX xJ24az+ttXv7rv4CUOxIuK+X3SKn4ZMasezYAWSD6fNH4ipXhNY8AR2+kuUE6BBZdOH6Xh2w3J wKE= WDCIronportException: Internal Received: from shindev.dhcp.fujisawa.hgst.com (HELO shindev.fujisawa.hgst.com) ([10.149.52.173]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Feb 2022 23:32:04 -0800 From: Shin'ichiro Kawasaki To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal , Shin'ichiro Kawasaki Subject: [PATCH v3 4/6] ext4/021: check _scratch_mkfs_sized return code Date: Fri, 18 Feb 2022 16:31:54 +0900 Message-Id: <20220218073156.2179803-5-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> References: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The test cases ext4/021 calls _scratch_mkfs before _scratch_mkfs_sized, and does not check return code of _scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount after it cannot detect the sized mkfs failure because _scratch_mkfs already created a file system on the device. This results in unexpected test condition. To avoid the unexpected test condition, check return code of _scratch_mkfs_sized. Suggested-by: Naohiro Aota Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Darrick J. Wong --- tests/ext4/021 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ext4/021 b/tests/ext4/021 index 62768c60..a9277abf 100755 --- a/tests/ext4/021 +++ b/tests/ext4/021 @@ -24,7 +24,7 @@ _scratch_unmount # With 4k block size, this amounts to 10M FS instance. fssize=$((2560 * $blocksize)) -_scratch_mkfs_sized $fssize >> $seqres.full 2>&1 +_scratch_mkfs_sized $fssize >> $seqres.full 2>&1 || _fail "mkfs failed" _require_metadata_journaling $SCRATCH_DEV offset=0 From patchwork Fri Feb 18 07:31:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12751027 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F6B5C43217 for ; Fri, 18 Feb 2022 07:32:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbiBRHc2 (ORCPT ); Fri, 18 Feb 2022 02:32:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232085AbiBRHcX (ORCPT ); Fri, 18 Feb 2022 02:32:23 -0500 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A055C28F96C; Thu, 17 Feb 2022 23:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1645169526; x=1676705526; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oNwFFRRH3apj/4n7qSFchUH8rbWyk695r1onG5cIzSI=; b=fI2zwD2vKQ+Ztx6H9VNJBPtmcs7zJlZ4+m9YiYK46uTZDQSjXOonxpiJ fiwdNjAMkk0Lex5Wj0Kp5oX9YBz0pnijuZgSaQqdVCkAUYMYcwR7fF6SU qsIWLCpga7NFq8f4myOKHnDdAdWlNh2s1uDxpa6oDqr1ZNEO1RELDTzbw zADcXSZ1+61XltJ7piJoduPHfitDhY5oCmi3W7hHtGPLAeDK2N2sqQNAw ymktW1JaEYoZHO5AJZ3SY2/LPko+YO584yVLlTtaW50FuPRozwKJLu6Vt 8jOOfrMRC+SVflEEJlpnBuIdHLH/H1P5AodVaJ0wzPBQZJ7r7BsTHeNsR g==; X-IronPort-AV: E=Sophos;i="5.88,378,1635177600"; d="scan'208";a="193264908" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Feb 2022 15:32:05 +0800 IronPort-SDR: 1c08pjIr7C6Bam6WPsMLr6ne3yiQoRmGCdxbwUCaDs8FOSi+omvsYulLGoU/1XuOi1Ylw6sYsV bxY9km2fp2fRI3M2OBN1K3MwYCE8dhkgqhNtIleZsgURPBac6+hF0mX8aUUzq0sZ7aXfFvQluq +f3nJ6sn6JbZn+SCrtzvYivfr56RA+QuZhYFIpSl8cdf1gTp/I/eNl9a+ALnSkOHUdSIWhKcEI aY/9aGFC/CghEqrCuJflHogTHIGIx+GpzQypy0r2ndadK4Pu0WB4PyGF4heNM1FvZM/SWwS1yg G/Cj0O8qw6zDvlpLZGNGbSZR Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 23:04:51 -0800 IronPort-SDR: WROGBVyGSpfS8L1IOhzjmJV1tlFLojtM6ebsEa6kc3Yx4WVzuHPo4yEvnRkIlrc6/JJ3+9nzKm rhSizKzD40GRQgBziYvERHPFgc8QY/eI1pu7EHnLTX7j/w9RlZl1ZcyLBnt78XvVZMbcTLxpJQ lk7habeRqFMFBD6JanewGSIHPPy2WkQn1VGlcA//4aFCfIXmMtE7suVP6CX87vPeBa7yNABxYu 4rAziF8ZPnA+RqlI7+pck0wa1EPuHy8s508jkAUi77XF7lhJC67/i8EvjEYS/xVxbfXdOxLBZ3 2OE= WDCIronportException: Internal Received: from shindev.dhcp.fujisawa.hgst.com (HELO shindev.fujisawa.hgst.com) ([10.149.52.173]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Feb 2022 23:32:05 -0800 From: Shin'ichiro Kawasaki To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal , Shin'ichiro Kawasaki Subject: [PATCH v3 5/6] xfs/015: check _scratch_mkfs_sized return code Date: Fri, 18 Feb 2022 16:31:55 +0900 Message-Id: <20220218073156.2179803-6-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> References: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The test cases xfs/015 calls _scratch_mkfs before _scratch_mkfs_sized, and does not check return code of _scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount after it cannot detect the sized mkfs failure because _scratch_mkfs already created a file system on the device. This results in unexpected test condition. To avoid the unexpected test condition, check return code of _scratch_mkfs_sized. Suggested-by: Naohiro Aota Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Darrick J. Wong --- tests/xfs/015 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/015 b/tests/xfs/015 index 86fa6336..2bb7b8d5 100755 --- a/tests/xfs/015 +++ b/tests/xfs/015 @@ -43,7 +43,7 @@ _scratch_mount _require_fs_space $SCRATCH_MNT 131072 _scratch_unmount -_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw +_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed" cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs # get original data blocks number and agcount . $tmp.mkfs From patchwork Fri Feb 18 07:31:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12751028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EF5BC4167B for ; Fri, 18 Feb 2022 07:32:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232116AbiBRHc2 (ORCPT ); Fri, 18 Feb 2022 02:32:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232089AbiBRHc0 (ORCPT ); Fri, 18 Feb 2022 02:32:26 -0500 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A78D2905B1; Thu, 17 Feb 2022 23:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1645169528; x=1676705528; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SCALdIr7wxcXgyYWV7+ctraSqir5D4Qsnffel822UHg=; b=nO82vu3Lj0y9dq6eDqIdcpwbYV2hCLGJrIxi7kGwIwRM0+L6tuVvBVSz 9g/q7tx5X5A01qcKuixgVdVVy5jszZClM4n4RE4nRF9vJrZCtl9oXqFlp h4vgk3QyEggc8KMwCS2f/l8d61QxY5RGWQmUlab0bUY85lAF/ob4T7Ux4 uQ/mydV/PJOsUYfaiiRgXvHJPLL6KOJyO+G5jpWnUwmL7KWylaKnI+Zbm Mak87z5lmHezDnNBZ8RR7/x6TkxFXuiDXvInqy6wUb3o2gZBfolOv1Jpo BJ3dKPNhD5yyr6mHFaccWxsdocLqKBZ01jo/2vYWgGN8qBCI5l0C+HxhT g==; X-IronPort-AV: E=Sophos;i="5.88,378,1635177600"; d="scan'208";a="193264916" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Feb 2022 15:32:07 +0800 IronPort-SDR: eoX5iwgmNi+aG9BErqfEVNxN82UdplqS5ZFBDHa+yUTDJVpN9iQbEg+BY2h45XNo/TfsPla4lb mr3hpYLq/3pjQiVmoGNWIXKBCOA7Dvc0OWEC/TRKgAXL4xL//ewYYzyA4gC2CYgEOQTBi6OQ5l J7qbjjTPCXNbgDx5XFBr2jjddcvnAmjDUgXYNhGtCIaNW8E74PvAfPf2QAKNondescTFlZr84R 3BLau1g2cEvLnXqOBxNKpM8BANyYYaa8ECg0klxLKIntgG0plvy+xNQjS+pKANnBZxeStz3s5L P6BVMayOkm9567Y4n0BY3JMW Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 23:04:53 -0800 IronPort-SDR: 9C/nd2ihRAMyO6kO4/oZ38LzoX/I7BpdsU8BgzZ9VYa7EDtc9ztQK1Q9kHcmvQdWkUUo9+bTid e5D1LeiaHGcScAiODJ55/mT8iLsaoW7UEX0DMj2fDN6jnIXXAkDDpOE8On0kW3yKm325Gb+awR 3LAFj4mZy7JiVA/DdiKG0XucbdpoTjtzmYtyTBIUoBWtRVgNAwXcuatUr1mWVKgqmVyO3tc94W RzXh/I+mupgBbBgD7CLm0mSzXQZvP0YEc+c0jEnEt96pw3v+vR179jly2N7KA1J70DGWV2fFo4 RVY= WDCIronportException: Internal Received: from shindev.dhcp.fujisawa.hgst.com (HELO shindev.fujisawa.hgst.com) ([10.149.52.173]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Feb 2022 23:32:07 -0800 From: Shin'ichiro Kawasaki To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal , Shin'ichiro Kawasaki Subject: [PATCH v3 6/6] common: factor out xfs unique part from _filter_mkfs Date: Fri, 18 Feb 2022 16:31:56 +0900 Message-Id: <20220218073156.2179803-7-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> References: <20220218073156.2179803-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Most of the code in the function _filter_mkfs is xfs unique. This is misleading that the function would be dedicated for xfs. Clean up the function by factoring out xfs unique part to _xfs_filter_mkfs in common/xfs. While at the same time, fix indent in _xfs_filter_mkfs to be consistent with other functions in common/xfs. Suggested-by: Darrick J. Wong Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Darrick J. Wong --- common/filter | 40 +--------------------------------------- common/xfs | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/common/filter b/common/filter index c3db7a56..257227c2 100644 --- a/common/filter +++ b/common/filter @@ -121,53 +121,15 @@ _filter_mkfs() { case $FSTYP in xfs) + _xfs_filter_mkfs "$@" ;; *) cat - >/dev/null perl -e 'print STDERR "dbsize=4096\nisize=256\n"' return ;; esac - - echo "_fs_has_crcs=0" >&2 - set - - perl -ne ' - if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) { - print STDERR "ddev=$1\nisize=$2\nagcount=$3\nagsize=$4\n"; - print STDOUT "meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks\n"; - } - if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) { - print STDERR "sectsz=$1\nattr=$2\n"; - } - if (/^\s+=\s+crc=(\d)/) { - print STDERR "_fs_has_crcs=$1\n"; - } - if (/^data\s+=\s+bsize=(\d+)\s+blocks=(\d+), imaxpct=(\d+)/) { - print STDERR "dbsize=$1\ndblocks=$2\nimaxpct=$3\n"; - print STDOUT "data = bsize=XXX blocks=XXX, imaxpct=PCT\n"; - } - if (/^\s+=\s+sunit=(\d+)\s+swidth=(\d+) blks/) { - print STDERR "sunit=$1\nswidth=$2\nunwritten=1\n"; - print STDOUT " = sunit=XXX swidth=XXX, unwritten=X\n"; - } - if (/^naming\s+=version\s+(\d+)\s+bsize=(\d+)/) { - print STDERR "dirversion=$1\ndirbsize=$2\n"; - print STDOUT "naming =VERN bsize=XXX\n"; - } - if (/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+),\s+version=(\d+)/ || - /^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+)/) { - print STDERR "ldev=\"$1\"\nlbsize=$2\nlblocks=$3\nlversion=$4\n"; - print STDOUT "log =LDEV bsize=XXX blocks=XXX\n"; - } - if (/^\s+=\s+sectsz=(\d+)\s+sunit=(\d+) blks/) { - print STDERR "logsectsz=$1\nlogsunit=$2\n\n"; - } - if (/^realtime\s+=([\w|\/.-]+)\s+extsz=(\d+)\s+blocks=(\d+), rtextents=(\d+)/) { - print STDERR "rtdev=$1\nrtextsz=$2\nrtblocks=$3\nrtextents=$4\n"; - print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n"; - }' } - # prints the bits we care about in growfs # _filter_growfs() diff --git a/common/xfs b/common/xfs index 713e9fe7..053b6189 100644 --- a/common/xfs +++ b/common/xfs @@ -1275,3 +1275,44 @@ _require_scratch_xfs_bigtime() _notrun "bigtime feature not advertised on mount?" _scratch_unmount } + +_xfs_filter_mkfs() +{ + echo "_fs_has_crcs=0" >&2 + set - + perl -ne ' + if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) { + print STDERR "ddev=$1\nisize=$2\nagcount=$3\nagsize=$4\n"; + print STDOUT "meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks\n"; + } + if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) { + print STDERR "sectsz=$1\nattr=$2\n"; + } + if (/^\s+=\s+crc=(\d)/) { + print STDERR "_fs_has_crcs=$1\n"; + } + if (/^data\s+=\s+bsize=(\d+)\s+blocks=(\d+), imaxpct=(\d+)/) { + print STDERR "dbsize=$1\ndblocks=$2\nimaxpct=$3\n"; + print STDOUT "data = bsize=XXX blocks=XXX, imaxpct=PCT\n"; + } + if (/^\s+=\s+sunit=(\d+)\s+swidth=(\d+) blks/) { + print STDERR "sunit=$1\nswidth=$2\nunwritten=1\n"; + print STDOUT " = sunit=XXX swidth=XXX, unwritten=X\n"; + } + if (/^naming\s+=version\s+(\d+)\s+bsize=(\d+)/) { + print STDERR "dirversion=$1\ndirbsize=$2\n"; + print STDOUT "naming =VERN bsize=XXX\n"; + } + if (/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+),\s+version=(\d+)/ || + /^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+)/) { + print STDERR "ldev=\"$1\"\nlbsize=$2\nlblocks=$3\nlversion=$4\n"; + print STDOUT "log =LDEV bsize=XXX blocks=XXX\n"; + } + if (/^\s+=\s+sectsz=(\d+)\s+sunit=(\d+) blks/) { + print STDERR "logsectsz=$1\nlogsunit=$2\n\n"; + } + if (/^realtime\s+=([\w|\/.-]+)\s+extsz=(\d+)\s+blocks=(\d+), rtextents=(\d+)/) { + print STDERR "rtdev=$1\nrtextsz=$2\nrtblocks=$3\nrtextents=$4\n"; + print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n"; + }' +}