From patchwork Wed Feb 9 12:33:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12740219 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 69B63C433F5 for ; Wed, 9 Feb 2022 12:34:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233304AbiBIMeM (ORCPT ); Wed, 9 Feb 2022 07:34:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233162AbiBIMeH (ORCPT ); Wed, 9 Feb 2022 07:34:07 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28761C05CB96; Wed, 9 Feb 2022 04:34:11 -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=1644410050; x=1675946050; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TUe9FJuEf7BWKrxSIxqPYK0eG0nCVdO3BScCuHtRrAI=; b=mkGoSj8+sfXYSdt6PZStHKyA1AwzszXeK+PGJB6zS4GHaV8fotLq5RqM wkIQmbbAi27ulLVzT8BvlgRXx48sphGz4sC6GCI3evq6o6H/YuxBFQpbX +sbYT13qHfqJa+tildjsCyjmzH74rP454pQqpqvYQq9oY/PVKbyYDF8OZ ztweHqv1Oc4Ods8jrieZF02jQFIdEWDpQiFb9ZxvQrX7pvlPcYf68JCZ6 f+YID5Xjsv5JmW+i0Tqgh6Q9fD+o1YY23TMxMsO/js3zhObnoKOrxNIqj /jot5ivPQ9FPCIUaLgTIlQTYcx6E7XaeZspf+vRWC/yRinXMkymvvfkfb Q==; X-IronPort-AV: E=Sophos;i="5.88,355,1635177600"; d="scan'208";a="197322995" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2022 20:33:06 +0800 IronPort-SDR: UKvnn3t/y3EyLzUMId9SnrRlcDZ8vkfLzFAwIvs2wkTigLovNtQZQzTfWmQ1EJkS9xmqahydkK vAz1XVO/UZs/04nCjle7dGZWB1p3rzpgKHZAA8unq+gWLkNWBZJre+hK5aqYI+j4wghRJGSyPi ocTG1vQqyiNX7rGt3id+2r1q9rqWJu1xq2GI/GnM5XIVt60xKmMWAKwIahrbRXRaZIT3BVKPiL hkv+gAAylKO7H6sfoXm1kl/3w2DnTT57y5CJA4P2fD0Ynq07jXTJ3eyppwGA4CzoC+5TUchKWD l4QKVEAUpEz+KZR5NmVoCF9J Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 04:04:56 -0800 IronPort-SDR: vAiN5QyjjjKejAtdG4aNSJlQ6OOVQ7nxR2T5oGBTNi3VGK0TIN+Egcj7/3qS3mJpa/jbuxURfF vb2aVZTxwMlitQ+vFQUeixI2NGrwuP0JPru+f3vB8+626QCflo3YVd/so7/cvKLaT/KGNNGbB0 Vt1OU/EbWoaEA+s04mu2ugRJPPdz2XW7+/fU8KGIqzjn3WJi4tidut9M3c7nPd9dsfIMGCzBpc xRuzR/BM2IIju0FH3crAD3ev0g3hLvNJQZzholK7eJ8psnP/4zCy+B+JxPurRV9RmZL867zRWO 9f8= 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; 09 Feb 2022 04:33: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 v2 1/6] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized Date: Wed, 9 Feb 2022 21:33:00 +0900 Message-Id: <20220209123305.253038-2-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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 b3289de9..eb2493d1 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 Wed Feb 9 12:33:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12740220 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 7D069C433EF for ; Wed, 9 Feb 2022 12:34:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233321AbiBIMeO (ORCPT ); Wed, 9 Feb 2022 07:34:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233281AbiBIMeL (ORCPT ); Wed, 9 Feb 2022 07:34:11 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B8E1C05CBB0; Wed, 9 Feb 2022 04:34:14 -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=1644410053; x=1675946053; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IjYNb7uundcc1qwAsCJBb8+PbZiYpFVjgURrlwgTinQ=; b=LvQqc5lH8MSnm1ToFy41dJeBPTiax6IqINpcxNAQH5nOZ4Dyx72Btd1h hrUAp30LR/oaCnyC2cQKYjESBba5pwj3iyDMC4T4Tl0ywa+igyxcYbnON JwnJClgtgkcnlBFGX0euD324JAsCy/qyIFNvQbkxYaDmjSdxjUibS3cq4 Mcxk5fWmXg2eZxvL7yqXGL/MZfBYJvwj/WYHupuSPk3FEt21tXQFI2kcZ ocf09tvu6/upCz88/lXDgRU7uLvNd35Uf+uEk4XGf/E/INGHMfIh/61Ma 8yaPiV+DjXgPcRvSmD0z/L7KAej46mRYIOoEeYVwBwXasWVSkDpCuBltt w==; X-IronPort-AV: E=Sophos;i="5.88,355,1635177600"; d="scan'208";a="197322998" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2022 20:33:07 +0800 IronPort-SDR: K0RlOruL3Zw7h3DH2A2/YI+9+3w8sWPDWOwg5n/NSLIeWZLM951d7GgtL5FlWuVbt7UloGvV+2 EZtDUjQ2FU5mCKhvrggKQvV+gqMuNrQx/EqO4M9EryhfwDYxnU6Rgcg0cVXqZWuoFQ9wvgaYzx l+1BSEcBTxHl0iWrYQ1uirMYOhL6S5jYPSZ+MG9Fa86cm50Kf8gf+W9KGFYQL1lb1xtK5Tap6B Dq0B0MOzoK1th9mS94oWlhSlnrzzN36dj/53TbPmkPjdB+4o/rLyWAWlssGUnMfGcxNwgikmYJ 9ej2+SOsSsVU6YRw00rnwYlw Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 04:04:58 -0800 IronPort-SDR: UP78An+WCqiIV9bH869MRVipxVBSwY9ET7nPha/IC3RdDd33h+aZGHBFXYxkVBHZqda30SRYbR 0QvmDqfH4SD/cJnU2xQlMHzAA3BXknSVQnKQJtRI3Nh+wCmDQlFWZIegU7R/ARSeC75lVW/lb9 IBqcxANBIRd5NOFn0pG7wSr7hQs2CBQKjRnrRjRcMT+14zb6TWorhCxkB1Ll9cXbd5buqGVymV +qp9Hs+8H2CxxqYCOcDKvTWp5QZ7nU8H8YF6PIw+PZtGHoiu38c7MNY07SDVAqaZ9kIIhA0/y2 B40= 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; 09 Feb 2022 04:33:09 -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 v2 2/6] generic/204: remove unnecessary _scratch_mkfs call Date: Wed, 9 Feb 2022 21:33:01 +0900 Message-Id: <20220209123305.253038-3-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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 Wed Feb 9 12:33:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12740221 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 68940C4321E for ; Wed, 9 Feb 2022 12:34:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233333AbiBIMeQ (ORCPT ); Wed, 9 Feb 2022 07:34:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233278AbiBIMeK (ORCPT ); Wed, 9 Feb 2022 07:34:10 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8DC1C05CB9E; Wed, 9 Feb 2022 04:34:12 -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=1644410051; x=1675946051; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5YBXzEn8+J8F5Y1tFEsqQdoZ77ZEWS7eBZS6UQQ1Xno=; b=bxSrwKCp4V9h9ZsvB4hfEOaNY4p5e7pWbtiW7zJTCO1993tvmJyKKkpg A9TM7p+4WEj3GrjuFM0ycd5XEpcPbGY7SL6RPf0U4zKRwbNSL6S7nqj9l U5y532UYWPO8Abl1jFcF4ZDSNO7hx0a46SCCMmwG8qAThxEv9pzX+9D+Y 8BpuifrVcRYCApA4STEVaUq/ZAoHM4MLeEn4wonuLKO8P3+h7cyIz3iT1 +voqFNehYTXK5BdkiSYzABTLLgwg0XAdDikhVxClMmIWg/fysq/JMofoQ K/Rdc9e+4QOtOPx0DFUP0Itkux1opteWinsokdLixhtqpvozl7oNa35k6 Q==; X-IronPort-AV: E=Sophos;i="5.88,355,1635177600"; d="scan'208";a="197323000" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2022 20:33:09 +0800 IronPort-SDR: eYEInYXi0nfN1D/j6FKGTObb+wrJcioetUXgdOO07F99XGrfenoBETOTZgyBlbxSvkAa7f0two 2aEOl3db3V/QHMFosaYDt8Tnql+pGsAjrkzOTV8Xhl+SZ3ZMZnzTDHIt8VlIRO1taqpqgZDT6p xbb+Q5ppao41DBFgoLKvn1c3Wq+QziblZqqEMPMS5CptfGBeVeiyqA6ZLYtPCB+KfHvwxZ1Ptv 4mPQpWwsa58LqKKm/aRU9YJCO5fgRV6t+1oBloGm/c75XXQ7x7Ha0J7CpieBqIuIVLBu6Lntdv spGYG7J/SU8UOfiib/gGrz/B Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 04:04:59 -0800 IronPort-SDR: ZRXErby/FnegHYZhqxmDHDeLBoYudP0ebjPQIMwQHTsuebka2eGQNowQiDk3LKovE7VjcJRtM3 FCqD2atJg/DzahY9RydfTpDbbHH4OJzqOZmFiyQdfYTgimAQpxzPikTane6+keoNQ8l72fsZ8V II61+LCiVlrCKwV49juJv7drYYuDWxOCE8DVhnYfrTx/KZa7X1Eo2JyOFXO34vrmOF773ecyFZ JIriDxHop0c5+G78lQZ+9xa6giFU7VWLXSskqDQRDZfY+dFadzUwkPHw8BaQenyJQIlbQCEjKq wtI= 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; 09 Feb 2022 04:33:10 -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 v2 3/6] generic/{171,172,173,174}: check _scratch_mkfs_sized return code Date: Wed, 9 Feb 2022 21:33:02 +0900 Message-Id: <20220209123305.253038-4-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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 Wed Feb 9 12:33:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12740222 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 71623C433F5 for ; Wed, 9 Feb 2022 12:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233345AbiBIMeT (ORCPT ); Wed, 9 Feb 2022 07:34:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233287AbiBIMeL (ORCPT ); Wed, 9 Feb 2022 07:34:11 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9E97C05CBB4; Wed, 9 Feb 2022 04:34:14 -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=1644410053; x=1675946053; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dqFAptI4CAvK6M8wR+plx0XzaNREix5nWvG4orfRMAg=; b=FjBT2XrQ2T3ImxnK311Rd1+iatDRq1bRWBORTSHUeOdK+gFB9Fp9UmDE UYAGZle0FX4n4Dbww7m4qSwkf7v6NzHGx0NDWfw0kRNDK/0Yns7mhupVq UmkYXyERe/2V37hBgeORMiA1R5rSKDFreijptl29/Ay7YizeReDgp8frX stB7KjxvclfZ8jWH7RJgimM7TzGonvQhxuCxpvFCsgLbOuiPbR9z6cv4U zj51hP2OvSeQGkYKKoAueNrOS7brH6rw5MSGshnnYn/kc6XoJpbha6QPM aKHfvs38b0gbffG2GW9xG9pSE2OJkK8dNqQydyrcEBoj3JTRzfDC8D1lK Q==; X-IronPort-AV: E=Sophos;i="5.88,355,1635177600"; d="scan'208";a="197323002" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2022 20:33:10 +0800 IronPort-SDR: mFZRlfokyvRoXI7FqS/zV2fWdE3a7+NItIiCdoq8fznulNUIR8QDxtgdO1MunJwEu2XCBeAM+I RLrvZUkZAIo0N30FW/CbGQlX10wYeUwuLqa44EwOc1uCmA9m4UyENr40R6pGped4UmKBdIDdCp MqzU/zyko6Nmqr8EvG8h5muiTnlf7aTacn5a/KwC4f5xENAfxQBjMTmtOq7JEqx7Rl3Tk00OF6 /vGY/XDoeVu6z8OqlGAyf3VDpv/c9K/8x6O8iW1DXaqR9vTZEinVQ1chCxlgkoB1Ae4Ct6H++R ZWm55GGkg1xpwil/UNw3MIiW Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 04:05:00 -0800 IronPort-SDR: W1MvrQzZxXO9gzaokMTGtCVKyoDpO+FHwt7B59GXSAQVDzu/e9HYudoFz46d7BCF6zfWHaMCp4 j9Ib1G6NVtKaRixCMwvMI7Kws5VDTouv/dCReYR83nIoEsGnzV/zsyEIOUBXY7gDXsrs0rLB2O 927auwjFAxcBfvwzUsIu6C9LLkwjOF0of0du8TyjgxHRQFZThLHCfq8W0lf8uTzb8rJLa8zb8e Xl2kd5rglWhuyNnD3rjeAuc7eXLfrO4+BKKsh1fb+Kec+uVu9h3gYOh8GOtyoeP6WIvfjnrkwl cmA= 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; 09 Feb 2022 04:33:11 -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 v2 4/6] ext4/021: check _scratch_mkfs_sized return code Date: Wed, 9 Feb 2022 21:33:03 +0900 Message-Id: <20220209123305.253038-5-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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 Wed Feb 9 12:33:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12740223 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 BDD82C433F5 for ; Wed, 9 Feb 2022 12:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233315AbiBIMeZ (ORCPT ); Wed, 9 Feb 2022 07:34:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233331AbiBIMeQ (ORCPT ); Wed, 9 Feb 2022 07:34:16 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B859C05CB9E; Wed, 9 Feb 2022 04:34:20 -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=1644410059; x=1675946059; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oNwFFRRH3apj/4n7qSFchUH8rbWyk695r1onG5cIzSI=; b=bpJS04HnYId9GobZQ9+wV79wMHcVvTqoAWPwI0ok40UQ09l+ytQUPqSD 7fYNyjp7VM72OQ26FXDPBfCzGrsg111MGNLGu75bGNQQwkI3j9E+uIV2+ 5e3wkmVksUeVMhKPefx89a1JuutLL1xqxXVwQFobF17xuEkuip6VIJKYy l8cG+urUuSBb7KV82B+mt8yT5hvjPItWs1m+z9eMKKvJ/O75U1A1OM1Qn yAu+epTlRfc2ABYZ8j1uZUGX4z1ZtysgygJNcuWFZmdPtgqCaa6eJTCBP nKlETLOssGHxi82RL5tCYOIMKVHAzG1Ikl32EG1+j5Gw7Gp9kMLNroOBM Q==; X-IronPort-AV: E=Sophos;i="5.88,355,1635177600"; d="scan'208";a="197323005" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2022 20:33:12 +0800 IronPort-SDR: ypOjbzajne+u+VcZtk2YgVFlV/9FztTVmVZBdGrhM9WRzyntr7YsE53m+TwXm+qD0ditlhQuYd OR+PIx6LM/aw1aVzwm55dysUnjgEGeUW4q52XYsGA887JlyH9G9Ds27pw+n+/HNs3vaNZ3kTc8 7Mp0ArapH3+fG1vGrp+CQZSxYbyHQNV611wnHeF46hDgtWjV8OHuMHEY9NtW2FNdLE3pgRq1qf PjWbHWlhTlYk3G5nPz/v6Xw87AtpArob8d9t2LOy1W4a2VrNKpKhf/fjVdHNsUP4ivT5R5tiKy bcbDBAcsNVU7TkrPMhAXdE/9 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 04:05:02 -0800 IronPort-SDR: HdPriuEKVhWsCgCMJH7nM3u0NNBHMW4LdTwQRup3PhxoOSboYk5/ZH42P9eGibQOPOZTmhxnrQ OLotWoFkTD5ZUzvrdFsNhXMH+alx/vYgbVt6EHvjwCT+UWmy8j6AjnSEAZJp6+Vw5KBD+3LGYX yxy3n8JG1zepbuigMyXqTdJ6BDn5IfCAnmfw/2TZVCiSkX1ej9pav8NEzYdedgLojkMCetSLSd JtSsF2A7iehXr3DlI8nx4rBrujJXk6WUFW/K/Q+jvsLu+W7V2KpmcrXFy3ifJIpA5dG+Vw6kY6 lu8= 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; 09 Feb 2022 04:33:13 -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 v2 5/6] xfs/015: check _scratch_mkfs_sized return code Date: Wed, 9 Feb 2022 21:33:04 +0900 Message-Id: <20220209123305.253038-6-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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 Wed Feb 9 12:33:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 12740224 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 78957C4167B for ; Wed, 9 Feb 2022 12:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233366AbiBIMe0 (ORCPT ); Wed, 9 Feb 2022 07:34:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233330AbiBIMeQ (ORCPT ); Wed, 9 Feb 2022 07:34:16 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAFDEC05CB86; Wed, 9 Feb 2022 04:34:17 -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=1644410056; x=1675946056; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=v8F0a5waA/YQ56I0Dss21pGPmf6h8Cgs4bg7jaXaTAo=; b=k8hvicD8502+zKz/mDMAq220TpkNOlW9s6VvfCNALiSZqKr1tW1/NMfa S7EUKA4qRrD0CezaOQW7Xpoc5QMrFxWcyy92osZc8hhJdt5T2R5SmEXUz 7AaURyqsE1TD0tnWBJb/NrPntsm5O5CVHFbcnXTgPC4yQMpG9YSmkM+E8 J9N5WfoEwyRpKi/fN3+GCGUPBnsV1ZTbWg4uJvHjs8vXJ+7LgzKQtgHsa 9zCmbExGclC8QxreaCg4psoZEdcYCtyahT4IYYg5ojeU/ktIhaQlqCclU 0uBqTbA8oaxLzK11Q9rQHezFbu7LdQ04ipfma7WnZ/FPyPfacoRvL1qm9 w==; X-IronPort-AV: E=Sophos;i="5.88,355,1635177600"; d="scan'208";a="197323007" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2022 20:33:13 +0800 IronPort-SDR: JpA1HTgLKXxDXk/M17FOAMTA9lWMLKf1K6QM5RetwY1OYxnMGeDkQPbPq3LhmMZPZLfje3h0uV T9CF/aG6FVWCv8jK164FLsqqLa5VDCKPhQa4qHBUrWUzgXdOBpTUXHfWuByCLm7U6t8riWafJJ jf267+pZaocW8XRJMPfZx8tJTjH3grKFGC26mcefOo9ncVCTHpgHVkYTsWOxB1QzJs/ULk4kvF 73VAGtpZ3W+f953vXzevFlzgZYd8qHEUFMZHgf0td8x9s4J1IxLEavvYYJviMj6VbbbrYYsa+N vXhFUz8BzsOnK3RTI54ZqxS3 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 04:05:03 -0800 IronPort-SDR: BfBS6Tk89DZ5JFL4XTsO1eopXGH3faS8RKQ50txEfu0HURHm6tDSXqfZT8NBD5dlhF1I/1Hfq5 XspOljRD0wsNNcUxmX2hpEIGknQSrrl219G4CJOi/5aVWSSn2bEXSy1EnUIJdLUC53mSANxDqx cqHoH/9lrRuv672ipDUQdlW2SMIg/dvNts0P65rVyEQmlDWEwYSuZlqD+G2xPeUzA3aj4FfPBi h30t1qgqleAlMQYW5lU6LmQQUltkviMdJrLK0uPOw5p2VUpwF33UAtrX9aGR/SMNA5PFzdVmpr j2Q= 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; 09 Feb 2022 04:33:14 -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 v2 6/6] common: factor out xfs unique part from _filter_mkfs Date: Wed, 9 Feb 2022 21:33:05 +0900 Message-Id: <20220209123305.253038-7-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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"; + }' +}