From patchwork Wed Aug 11 15:12:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89227C43214 for ; Wed, 11 Aug 2021 15:13:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C44B60FDA for ; Wed, 11 Aug 2021 15:13:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232910AbhHKPNW (ORCPT ); Wed, 11 Aug 2021 11:13:22 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39984 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbhHKPNV (ORCPT ); Wed, 11 Aug 2021 11:13:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694776; x=1660230776; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jp04U75vX5scCP7VtbLDhOyHbGzvl6TPnQ5nIrQ4LRs=; b=lWLveeOw4bII3HXMCNqV3i/0GGIzu5eUIjyPmMY+GKTkVPn2l0W9GG3W ovmHZSWZRLFqf5HuEVd3z+0NUdKX8fF4vfDK3YXLEuRUl5Pp9LlUMP0UF 6RUHuMyesmwjj3rbAoNLbTJq8NuEE1ga9a3KbURylE7nA9gUxEu62BtOA GnpzvUOt7fTRwSrYKQRpa8yLsBmF+8Y9sxVUs47GiILnvfbfl2wTadEsJ ailzJM86ULvHOjS94R3bxWhIlG3QAy8WGT//lMpgSYPkNEV0HXEVfRtHp xGD+06Bbo82RIpMtazeO9MZ3XLT9PUPOInubX7OSd3DahI3VuxcoqmTnC A==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942555" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:12:55 +0800 IronPort-SDR: VRcyhJFYE7Ivu7G4n269fU1q/837lGy9EQTxb0KNxVAF1tLbOsBSzI8Ex+xyQ1oZl17fv1S4p6 W78Of475Nmk90/25eYHGLg6j/TkpwCFbnS7QFqfFWErn2JuZb9XiFeSwbFfYR/rks0bBAUXwkA eQwCXDj8tVPMgVvoaWQc5kxsZzl6/5C/wHvD+PnUYpATEgmC/xcX6gRebu08FXgmMFKUYCcSnH Zw5P84Sxwncb4GOdo2+rvoEqn4A5s602z4uO5WuaytDYvVElxYlcyCWrS8nh2APrfmNxy0g4no dy9eu5VpeIwxtit9Zy6AqODc 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; 11 Aug 2021 07:48:26 -0700 IronPort-SDR: rPLCKwagFuzPiNIymfwV+v+NCTSpLYImbacOyPSVsn0scK6OemitK6r+jsHiMGfcoYDjrHOgHO qeOMZIj4U4wb7k1mzzuIHbqoD62jIVZXJTwNN71eF6MPz6JoC4mpe3Iobx/Fr6bNyOzxHRrAtH oCgbaSHH1a2Vag3EgyUJ/HgwzEEnVoUyaWJgF3fNl183SaC1n1FwyOTqrO24UC0GT/3WteobWC /yotAYZZmc0gWQxe+g89hdAPlOyja/Da+lvGklvwPrt4zedZ1LuUbmmCc1WnyrUwW+iSyGgrY1 GJg= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:12:56 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 1/8] common/rc: introduce minimal fs size check Date: Thu, 12 Aug 2021 00:12:25 +0900 Message-Id: <20210811151232.3713733-2-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org _scratch_mkfs_sized() create a file system with specified size limit. It can, however, too small for certain kind of devices. For example, zoned btrfs requires at least 5 zones to make a file system. This commit introduces MIN_FSSIZE, which specify the minimum size of the possible file system. We can set this variable e.g. $ZONE_SIZE * $MIN_ZONE_COUNT. Signed-off-by: Naohiro Aota --- README | 4 ++++ common/rc | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/README b/README index 18f7a6bc3ff0..b9877b7d8b1b 100644 --- a/README +++ b/README @@ -117,6 +117,10 @@ Preparing system for tests: name of a file to compress; and it must accept '-d -f -k' and the name of a file to decompress. In other words, it must emulate gzip. + - Set MIN_FSSIZE to specify the minimal size (bytes) of a + filesystem we can create. Setting this parameter will + skip the tests creating a filesystem less than + MIN_FSSIZE. - or add a case to the switch in common/config assigning these variables based on the hostname of your test diff --git a/common/rc b/common/rc index e04d9365d902..4cb062e2fd3f 100644 --- a/common/rc +++ b/common/rc @@ -956,6 +956,16 @@ _available_memory_bytes() fi } +_check_minimal_fs_size() +{ + local fssize=$1 + + if [ -n "$MIN_FSSIZE" ]; then + [ $MIN_FSSIZE -gt "$fssize" ] && + _notrun "specified filesystem size is too small" + fi +} + # Create fs of certain size on scratch device # _scratch_mkfs_sized [optional blocksize] _scratch_mkfs_sized() @@ -989,6 +999,8 @@ _scratch_mkfs_sized() local blocks=`expr $fssize / $blocksize` + _check_minimal_fs_size $fssize + if [ -b "$SCRATCH_DEV" ]; then local devsize=`blockdev --getsize64 $SCRATCH_DEV` [ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small" From patchwork Wed Aug 11 15:12:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EFD9C19F36 for ; Wed, 11 Aug 2021 15:13:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EB3A60F21 for ; Wed, 11 Aug 2021 15:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232967AbhHKPNZ (ORCPT ); Wed, 11 Aug 2021 11:13:25 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39981 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232921AbhHKPNV (ORCPT ); Wed, 11 Aug 2021 11:13:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694776; x=1660230776; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TfvYiMrnoZ579dEjGtscwbhq2lVPTyI4PUfkdTSCiZs=; b=aNIIDaeiNcnEmHPBHWVDYELCK6z6wQQCfPmB7udcqrPFb1+EepbcFVlc K9J3rvbKOxR5V4M0Iy9Pd7Iwjm7yu4PQQtxT9votUU6Vum70FyEydDLWO QxI+CgaBJ04w20zLN3IOnEN/47AoK4dX2pXzBBC0q42qQHMD30O6f3iG0 wO65vj1ysuV4Zc1tqJl0APADFceio974eJqDn+OBaX7uEigbzicELD7Ud XkQadDtXFoyu06Et/tn73yKjW+BxgV8YU0maIsBdPbMHFUIf1STxUWf/O QEf2xpJXSEwUa2B4xNN4Zm+y/Vrb4D8i6fFSDxk14lP1flmGqV7PBzHyg w==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942560" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:12:56 +0800 IronPort-SDR: xcC1hnV5lr3Pbqap7CBxoU2dyMMixg9QqToGTeyAxd38s0hB1fhjwPBmNw/FrN0NNpKSD7LflK 2IS3X1+BfVM2eGGJc4vbN2J0UpSa8QlZVlUb+bOBcguzmpK5Lp6Nxbfv9+lsHd3WOxzOce4CLj rbclT8l5AIMVERysBzCXqtvEJfdIcinm3/8elNlRUN49t/chfElTMVbhDclCbxVzx//nViecOM UkPR6yklWAL+j5hRf9FQ1pS1uJ7orX2q8CG0f23PfGf8sLhzlRtvP1hpO3dgRo+YDq5LzKDaqa AHmakmog09oUk6TottGk7XCR 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; 11 Aug 2021 07:48:27 -0700 IronPort-SDR: s6mPkrgmK5eb0l2mZ/MDZtFM7A1xjY/14X0My/tGhE4GcFewNEhkRqfDKPKeLfO0ZV4s2XU0D5 t7Uhp7+E3LdQkD4795J1DEqbrI2Dy6kN/QrI9Nr46BdBtmg4GpHFkgWxdk/7urAwvobNxrvcdT E+42eydgw5UF5UAT9xBqqM99mHwH3C4kRqb0twpbUCXv8IZqhLZ2qE7JAnjngDd1pYQyR3zh05 XS7ldyl8pCDnqIdms/Awy64jew9WcSsiG9mssLNdw2TtNkyPXKADKDlwLFlb0zU9Og+FTds1SB fwM= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:12:57 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 2/8] common/rc: fix blocksize detection for btrfs Date: Thu, 12 Aug 2021 00:12:26 +0900 Message-Id: <20210811151232.3713733-3-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Mkfs.btrfs's "-b" does not specify the block size but the file system size. Use "-s" to detect it instead. Signed-off-by: Naohiro Aota --- common/rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 4cb062e2fd3f..7b80820ff680 100644 --- a/common/rc +++ b/common/rc @@ -978,7 +978,10 @@ _scratch_mkfs_sized() xfs) def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'` ;; - ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4|ocfs2|reiserfs) + btrfs) + def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-s ?+([0-9]+).*/\1/p'` + ;; + ext2|ext3|ext4|ext4dev|udf|reiser4|ocfs2|reiserfs) def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?+([0-9]+).*/\1/p'` ;; jfs) From patchwork Wed Aug 11 15:12:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66090C4320A for ; Wed, 11 Aug 2021 15:13:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A48860F21 for ; Wed, 11 Aug 2021 15:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232952AbhHKPNY (ORCPT ); Wed, 11 Aug 2021 11:13:24 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39984 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232944AbhHKPNW (ORCPT ); Wed, 11 Aug 2021 11:13:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694777; x=1660230777; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WB3vlUTr8ArDxDywgsUW4dk+jJwQp2ZWt/wFSDH6kXg=; b=B3ocPWf114VIPmXcbS6UOUEjCoC1hhmsDLK65sr6mgkEjyLy5wbqH2O0 WORwZxPftub/vgKQVqkjB1iy1DND6jaeemmckACSwqi4EZgSpQPpBOAxX vZU8oh8G1JoCW0EHwwwGRDd2sJKQy/N+LkqOSQFMTZH/+vHUng80rT7lK HiOkyAOivzE0ag2mB1UneL4EcToP3pqhPceMd2BSrK15X6525dzswi+Sy NVAjCDXNhoIdkMGkrqFCV03Ha9T2jqL3xKchkt6P2d8rIv0cGZB3zrZjB RZnyq5t1oftnrERDHrsBsGf06V2PEWqVoNNUd5PWdmrhQ2i8oYjSfQRPY g==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942561" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:12:57 +0800 IronPort-SDR: PBDwVTpUwbF78EBjfZx/+x8ME1w42EqjRVtUAMw74pPpi6hfS9surUmiOb3YbtAh2tB5a5kGYb r20QRTS7kBFZ4stCp1vvSRAColmQFp/yw7RC0yL/vCc1UG0Cv/+AQ5D7SnMmmPoXn9M9XT/xfF 5QS4IqmaCl+D5Jtwwj3r6O5Mf29L3PDZ5D4Ikc4Qg+y38omhelVOps/d7bpZYm40dhpxR+54sA XFk8XzrxxyoL27rvIViHy7u/LNEi6gJK7mMZeJqYjFxo3gTNz3FNmWxmPzr0+wGfaG0w9OaGkZ 2Zh9eHcEIHUQwr8wHm5n1DhM 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; 11 Aug 2021 07:48:28 -0700 IronPort-SDR: maVAoMIKRIHfKf/oBpWafleXzDpBZtCwcJ4SkbcxlmWl1ByPLPku9oRZf9e74zJW6f4pDVQymO 6KjnSvkN0fsf7Ed3Lv+mpKld3NaNkDIMuL8ODJLMuhXPUySHL176EGp1SPITcx3kruzkNWzQxD RD6+bwev3RtNkEZqig2gfWl49fB5F2C/jxdR9gOp7UeqJkivDp314OURu+HIdUpjhLS8K6g7k8 lafqSKnKC3jpncVIlFMQhCw7QLMNklSDP5xjQV0zNj9173xKCsOOhDun3YXGv9dmWisYituG4p POE= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:12:58 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 3/8] btrfs/057: use _scratch_mkfs_sized to set filesystem size Date: Thu, 12 Aug 2021 00:12:27 +0900 Message-Id: <20210811151232.3713733-4-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Btrfs/057 is using _scratch_mkfs directly to set filesystem size. This can be _scratch_mkfs_sized instead, to go through several checks (e.g., minimal filesystem size check). Signed-off-by: Naohiro Aota --- tests/btrfs/057 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/btrfs/057 b/tests/btrfs/057 index 074ac96abcda..782d854a057f 100755 --- a/tests/btrfs/057 +++ b/tests/btrfs/057 @@ -16,7 +16,7 @@ _begin_fstest auto quick _supported_fs btrfs _require_scratch -run_check _scratch_mkfs "-b 1g" +_scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full 2>&1 _scratch_mount From patchwork Wed Aug 11 15:12:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D4CEC4338F for ; Wed, 11 Aug 2021 15:13:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73A1F60F21 for ; Wed, 11 Aug 2021 15:13:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232990AbhHKPN0 (ORCPT ); Wed, 11 Aug 2021 11:13:26 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39986 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232923AbhHKPNX (ORCPT ); Wed, 11 Aug 2021 11:13:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694778; x=1660230778; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=s2Pc7oDcG0X82jcRxNaM184LmvuXSQJy2M4KZfdmrSE=; b=j6aA2qEuYDdZo8DWQFtF6f8WpjBEThowZhZg3SKq67WPfyjHozhMpcx2 v+NDRDJCGo7S8PogI75FMUT837UYn22ss4tVlJP/cnMvcDzqG6qcV+MSv HaMpDwE/ht0Kobin01dDNVA72LlVqlrEGrJXfFz0C4Ix2TbHJVrsGQ2nv oTqxJWdQwI/9POciNQId/57kAijgn9laxqjVhaNxqrUFCyX/yFPTzIdKu 3e4CCZD52ATPh062i2H+IMuuzOGiShEKMh3Z0fDXc5UshQ0veCamGYmO3 G4K26UyiZ5x22gwVyLiK+ljl7vwpxkMLzErXJM9wUEGND16sMWZjmWDr0 w==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942563" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:12:57 +0800 IronPort-SDR: 3PQqdiedGGOItY2LxCoCW0/IMzFS+uzfkyHkJHWSh8Rcam830vLPZwrJZ+gszRUJIzw+XHbJSn gvEmE+E/PjW9cAXGIhawfIQkfW+IL93x6QRKRYZ3XgyXFHZBtjiJGlL9o5m6rri8C2g2igX83w JQ6GxKCtas9MmZbBvauBCPmoPDnZR2uTa9nQIAfCApSxa2BmL/b3TSST3voRuZejD6643qpk27 aCPd6i+3MTjxLMa5O9MFr9mWFRz4pGtQZ4gniPiFXNZVwTtW36mL56apxiAbomSvBpF6Bq7Qb7 x4atFpA+qeuEeilkdjY/+a41 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; 11 Aug 2021 07:48:29 -0700 IronPort-SDR: EfCpYHw1gBDEhWXyXPbFTvFV+jLh/RYWrF1YGaJX7Y5rwtixgYU/kJZPzKSXDf84XeFnCL6fZA DDI90NUdb8zvw2OrjKvC4Zmf5BVkQIGrdQ+rw/5b0a3ICHGUzmfFCD7M67EvfkqImOpCnyTS1D jso8lF+fcuFqtz6AjLjb9KPJ8znnFeyvgR3Rd7OJWr5fan4Umlr+1UrDYsBOviEcozyZyS2uqN +aXne11IAD5a/fg6FL+9ilaB9cCqzyIrkcj6Qemu9eOivm6SUQkGWEqhqmFwe+5RSsYPxZuCh8 KkU= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:12:59 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 4/8] fstests: btrfs: add minimal file system size check Date: Thu, 12 Aug 2021 00:12:28 +0900 Message-Id: <20210811151232.3713733-5-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Some btrfs tests call _scratch_pool_mkfs or _scratch_mkfs by themselves to specify file system size limit. It slips through the check in _scratch_mkfs_sized(). Let's add size check call for each of them. Signed-off-by: Naohiro Aota --- tests/btrfs/141 | 1 + tests/btrfs/142 | 1 + tests/btrfs/143 | 1 + tests/btrfs/150 | 1 + tests/btrfs/151 | 1 + tests/btrfs/156 | 1 + tests/btrfs/157 | 1 + tests/btrfs/158 | 1 + tests/btrfs/175 | 1 + 9 files changed, 9 insertions(+) diff --git a/tests/btrfs/141 b/tests/btrfs/141 index 6f9a177a4487..cf0979e9b42a 100755 --- a/tests/btrfs/141 +++ b/tests/btrfs/141 @@ -55,6 +55,7 @@ _scratch_dev_pool_get 2 # step 1, create a raid1 btrfs which contains one 128k file. echo "step 1......mkfs.btrfs" >>$seqres.full +_check_minimal_fs_size $(( 1024 * 1024 * 1024 )) mkfs_opts="-d raid1 -b 1G" _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1 diff --git a/tests/btrfs/142 b/tests/btrfs/142 index 3caa37d167ab..1318be0fba18 100755 --- a/tests/btrfs/142 +++ b/tests/btrfs/142 @@ -33,6 +33,7 @@ _scratch_dev_pool_get 2 # step 1, create a raid1 btrfs which contains one 128k file. echo "step 1......mkfs.btrfs" >>$seqres.full +_check_minimal_fs_size $(( 1024 * 1024 * 1024 )) mkfs_opts="-d raid1 -b 1G" _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1 diff --git a/tests/btrfs/143 b/tests/btrfs/143 index f062f77bd7ce..6736dcad1702 100755 --- a/tests/btrfs/143 +++ b/tests/btrfs/143 @@ -40,6 +40,7 @@ _scratch_dev_pool_get 2 # step 1, create a raid1 btrfs which contains one 128k file. echo "step 1......mkfs.btrfs" >>$seqres.full +_check_minimal_fs_size $(( 1024 * 1024 * 1024 )) mkfs_opts="-d raid1 -b 1G" _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1 diff --git a/tests/btrfs/150 b/tests/btrfs/150 index 56938b0f4500..986c80697f15 100755 --- a/tests/btrfs/150 +++ b/tests/btrfs/150 @@ -43,6 +43,7 @@ disable_io_failure() echo 0 > $SYSFS_BDEV/make-it-fail } +_check_minimal_fs_size $(( 1024 * 1024 * 1024 )) _scratch_pool_mkfs "-d raid1 -b 1G" >> $seqres.full 2>&1 # It doesn't matter which compression algorithm we use. diff --git a/tests/btrfs/151 b/tests/btrfs/151 index 3150fef07e19..099e85cc7b2e 100755 --- a/tests/btrfs/151 +++ b/tests/btrfs/151 @@ -23,6 +23,7 @@ _supported_fs btrfs _require_scratch _require_scratch_dev_pool 3 _require_btrfs_dev_del_by_devid +_check_minimal_fs_size $(( 1024 * 1024 * 1024 )) # We need exactly 3 disks to form a fixed stripe layout for this test. _scratch_dev_pool_get 3 diff --git a/tests/btrfs/156 b/tests/btrfs/156 index 364135ab3e65..11bf4638c7d1 100755 --- a/tests/btrfs/156 +++ b/tests/btrfs/156 @@ -37,6 +37,7 @@ nr_files=$(( $fs_size / $file_size / 2)) # Force to use single data and meta profile. # Since the test relies on fstrim output, which will differ for different # profiles +_check_minimal_fs_size $fs_size _scratch_mkfs -b $fs_size -m single -d single > /dev/null _scratch_mount diff --git a/tests/btrfs/157 b/tests/btrfs/157 index c08cebdc9c22..0cfe3ce56548 100755 --- a/tests/btrfs/157 +++ b/tests/btrfs/157 @@ -60,6 +60,7 @@ _scratch_dev_pool_get 4 # step 1: create a raid6 btrfs and create a 128K file echo "step 1......mkfs.btrfs" >>$seqres.full +_check_minimal_fs_size $(( 1024 * 1024 * 1024 )) mkfs_opts="-d raid6 -b 1G" _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1 diff --git a/tests/btrfs/158 b/tests/btrfs/158 index 4a642f52c05e..ad374eba8c7e 100755 --- a/tests/btrfs/158 +++ b/tests/btrfs/158 @@ -52,6 +52,7 @@ _scratch_dev_pool_get 4 # step 1: create a raid6 btrfs and create a 128K file echo "step 1......mkfs.btrfs" >>$seqres.full +_check_minimal_fs_size $(( 1024 * 1024 * 1024 )) mkfs_opts="-d raid6 -b 1G" _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1 diff --git a/tests/btrfs/175 b/tests/btrfs/175 index 8a9c0721f5ed..bf0ede257f87 100755 --- a/tests/btrfs/175 +++ b/tests/btrfs/175 @@ -14,6 +14,7 @@ _begin_fstest auto quick swap volume _supported_fs btrfs _require_scratch_dev_pool 2 _require_scratch_swapfile +_check_minimal_fs_size $((1024 * 1024 * 1024)) cycle_swapfile() { local sz=${1:-$(($(get_page_size) * 10))} From patchwork Wed Aug 11 15:12:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F26CAC4338F for ; Wed, 11 Aug 2021 15:16:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D788060F21 for ; Wed, 11 Aug 2021 15:16:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233070AbhHKPNp (ORCPT ); Wed, 11 Aug 2021 11:13:45 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39986 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232949AbhHKPNY (ORCPT ); Wed, 11 Aug 2021 11:13:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694779; x=1660230779; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7CU0P+8VJ4+R9x8XmFTIOdMI1rRPEB7YQ5E7pSeMbIY=; b=j0fEg6q84MWmwq2q1ROP8e83cbe+xfN0VsPUh/BpvO4tmXuS/c2aIU37 nI+aIDfwDPMSMsKRTpL+0CCYFAr23f4fX/7vPtWhR4JeMYH477b3kAs7c ywo9mXDqgJXPKcYL9Yv1NDQ34OPsjySyKB/3I75WzUTj+OhtsFNAMNoWI eCjzNfwOrnOgbbqDwISbCmNEQ68xnNmaAbiyEtDIw1kv2ENSy3DShBSRL fFfB/PlC+qymqxjAcu8TqkenwNK045iO5BGDLRf1711h+yKmvB1Cghew/ wUSA6MM9KM4FkCug80ozK7lgd7A/myKQ0bu+KiQ5jaLvgBY2yNkVY+DCZ A==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942569" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:12:58 +0800 IronPort-SDR: S+0qNqaFivJ/ohoF0njWqqFgs/hE9RIMu+jYw6GJALYMkskslK4C3QLTHRzTysxgFkZYvPIs6D 79pTqhrFlmhwo7oHR8qEv2zgRxZlLyrO0ZjOkTHj+M0zQxyivREIwq4E8F3aMyhIoFF4JLvTY7 XEoXTrkK5NDutC3SwkjTuGPDI9TZw5ZQIOKHWu+lS4xp279S0CHwfHZSLqIcLV5i7BBomjQ827 OkqHAx5rMZ9nWD0odSD1OhDfR+6UXspHjHpMOJ3fiqFekrOT7Gfej+D52w2h4OO0fM3gZ5vOwI MFvjmMrIj/xq1GkRRULL8DpE 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; 11 Aug 2021 07:48:30 -0700 IronPort-SDR: zp3MTPftmHo7btnA8yBqDt8ODbXXIsT3ooeA3Wc0jLpXUlqWTCJHwndqwnf8coqtDQUT0uKfh5 qijlvvEJXQGwaXxPaLyB0egnR/D/Q0qhHdlQyOf5nLaujWn1I0D6JnN7p71R9jVV8NyISF8hlZ gNwBLkJ66Jp0VwLi1c12CTDkmKioHa5gr0MAw0P9qsBPdnFQYLcQjntsD3UoSOvGBTbWPmgG88 DVGnCiKRsiNe/Q+Fft1DaVhU9LcOdfBnutP9hwhY0TKvByRZX2l4eIXLXKKRZyIPp4HRarqmKJ DGI= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:13:00 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 5/8] common: add zoned block device checks Date: Thu, 12 Aug 2021 00:12:29 +0900 Message-Id: <20210811151232.3713733-6-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org dm-error and dm-snapshot does not have DM_TARGET_ZONED_HM nor DM_TARGET_MIXED_ZONED_MODEL feature and does not implement .report_zones(). So, it cannot pass the zone information from the down layer (zoned device) to the upper layer. Loop device also cannot pass the zone information. This patch requires non-zoned block device for the tests using these ones. Signed-off-by: Naohiro Aota --- common/dmerror | 3 +++ common/dmhugedisk | 3 +++ common/rc | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/common/dmerror b/common/dmerror index 01a4c8b5e52d..64ee78d85b95 100644 --- a/common/dmerror +++ b/common/dmerror @@ -15,6 +15,9 @@ _dmerror_setup() export DMLINEAR_TABLE="0 $blk_dev_size linear $dm_backing_dev 0" export DMERROR_TABLE="0 $blk_dev_size error $dm_backing_dev 0" + + # dm-error cannot handle zone information + _require_non_zoned_device "${dm_backing_dev}" } _dmerror_init() diff --git a/common/dmhugedisk b/common/dmhugedisk index 502f0243772d..715f95efde29 100644 --- a/common/dmhugedisk +++ b/common/dmhugedisk @@ -16,6 +16,9 @@ _dmhugedisk_init() local dm_backing_dev=$SCRATCH_DEV local chunk_size="$2" + # We cannot ensure sequential writes on the backing device + _require_non_zoned_device $dm_backing_dev + if [ -z "$chunk_size" ]; then chunk_size=512 fi diff --git a/common/rc b/common/rc index 7b80820ff680..03b7e0310a84 100644 --- a/common/rc +++ b/common/rc @@ -1837,6 +1837,9 @@ _require_loop() else _notrun "This test requires loopback device support" fi + + # loop device does not handle zone information + _require_non_zoned_device ${TEST_DEV} } # this test requires kernel support for a secondary filesystem @@ -1966,6 +1969,10 @@ _require_dm_target() if [ $? -ne 0 ]; then _notrun "This test requires dm $target support" fi + + if [ $target = thin-pool ]; then + _require_non_zoned_device ${SCRATCH_DEV} + fi } _zone_type() From patchwork Wed Aug 11 15:12:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4F96C4338F for ; Wed, 11 Aug 2021 15:16:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93ECC60FC3 for ; Wed, 11 Aug 2021 15:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233084AbhHKPOk (ORCPT ); Wed, 11 Aug 2021 11:14:40 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39986 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbhHKPNY (ORCPT ); Wed, 11 Aug 2021 11:13:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694780; x=1660230780; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VEO7s/cM268oJYh6wmyPOMWRjlyivUmJaG7MGhMyJ/I=; b=rktfW4htMPIY33TJJ3z/XS9c2IL9da3M813XpdfS5KDXh8QmmvM0nPkb Xn7kKOcMzhTOrgv3M0kNrIJcPdqWO574X8nAD4+kpcxARg0r+MHGYGwK1 TaM5p4EUqPRJ4G6UCXp8opFGdHf7Dw/alv5wevEgrfSRuylgi9NDtgySV XVmIo06Wydh6FaN2L3knJwzz7kPC79KmCxgns1o5cCiUrkl65tnXMGW7/ N36oh7+l/bSxV8BlmgKgRIWn4XoPza3fzompzvhneuHUFnC0po/aHmfAF gx+GHUum0Hhcae9kMPSVO1S9aFmMawimwEgUKArgme6k3Wbpo3wjJfCe+ g==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942572" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:12:59 +0800 IronPort-SDR: 9UhkkjTbYUJG4HgIh1RhSdU2dVhd59bV2CMVIGFfMqlvj1fJOCVRHXiit48hEo2lFRpo25dS00 TGjP8HUvFONJuk3BPfaoDS6DG4fSROZXBuivE8dAMhXLEt43afxmko0WaT6jPWqJalqAkv6ZlY SZbWDABpAMESGKvMnk7Ml3ByWY/yNLgAy/mR4PiGvh+sqCyBrRMRwMS+X1b9ZCIwau8j8tNKzT Iz694wbtamvA9WesZBzN+O3Q293x4jBrwD306YOfKShcfUcXUUa1wkzSx2BDE1/u8VniOsXC70 pRBBpjBNyPLWqKmo1mkqRK7Q 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; 11 Aug 2021 07:48:31 -0700 IronPort-SDR: g+Y52NKrgjQHx0m/zdtI4Z1khcP9pVfR4zMKjn4VVMZ5DfI3VPgAFeDJPM257aGt76Spj+bG5X mxL8UC8/Kq+HwFxcR8XLnd+cMywHEamDaI+n5XsW57rq6t95AdjYEJB0jU0V6+9YWqwzLpSH+0 usMI9wSN6FQyQ78xkXcc7r1m2q5Wn+8/4xNhOiRb30jXd+3pVWMiV/DD4wIiAgjjfmw/ecMwXm 6Z6SZ66/vm8hAqE2riHIRr3qd0Lbb+WUHMLus8McQFMtTYUoB0mw07QpLpZBFy90HixQLbDBJl FAY= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:13:01 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 6/8] shared/032: add check for zoned block device Date: Thu, 12 Aug 2021 00:12:30 +0900 Message-Id: <20210811151232.3713733-7-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Mkfs on zoned block device won't work on most filesystem. Let's disable the test. Signed-off-by: Naohiro Aota --- tests/shared/032 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/shared/032 b/tests/shared/032 index a84af3a603d8..131323ab5b0f 100755 --- a/tests/shared/032 +++ b/tests/shared/032 @@ -17,6 +17,8 @@ _supported_fs xfs btrfs _require_scratch_nocheck _require_no_large_scratch_dev +# not all the FS support zoned block device +_require_non_zoned_device "${SCRATCH_DEV}" # mkfs.btrfs did not have overwrite detection at first if [ "$FSTYP" == "btrfs" ]; then From patchwork Wed Aug 11 15:12:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6861CC432BE for ; Wed, 11 Aug 2021 15:16:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45B5460FC3 for ; Wed, 11 Aug 2021 15:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232949AbhHKPQv (ORCPT ); Wed, 11 Aug 2021 11:16:51 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39986 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232971AbhHKPNZ (ORCPT ); Wed, 11 Aug 2021 11:13:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694781; x=1660230781; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZeSNQoLQ9XCjDwURe1m9XjPKa7JljWXhZ6AkJgMEZkE=; b=JtwSUxZQSGa+OmAm5M2EzbH1urqbQ5+oIuP6XzdmEBdZPdOOI+2l9y0j o3z9Zd0xQ84dOoI7uY3+rdOhJU3xVFkz0RuhnSyo9E0mHqQburZnG1VJe 7NXLAZISCVAkErzJsGSb7QzA9kHHsHIfskt9Jo9aZVr39x2SudwJoyycD BM0wHmnJc2U7L6eEgrg6WYZIlEh73ES9qbRgaRgCanMRUBCt7ndWcgafq AO+uFUfXtkpD7w1hoZVoHo2L3U65y9J+HBbthgYWe3lkItPSH6e9uZHrB OIVN3Af5AMM88UqNpVNHK43vWvk5uxmUzhJeyb4R7pdP5zfgyL/VTWrdC Q==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942576" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:13:01 +0800 IronPort-SDR: 6ffKU53/nlC6yDcfkwjwxnLu9kbOy2dmfQqlfOcKVzcYupnwnA79IIxeRhCJ8u3PSV9QCvkNRX SZKVZaRJVNz1R2nUaQD8/C6ssc98wN/LIyaVLFg4xU0ThetSEez7UtciJFVMxHh3j8scvQDa6S vJ6be5qOCPowjrcquvn35KgVIe9tyXo+lLTQDw3gSKeCLSkYSRP0JNwI/vxiTRQIRe9VnIUXTH emuTdPIm/QQ3mnH8ziQRzQGk5sNp4ZkY/QOmewHtiKAknESSvE1VPNINdpw2cAI9S4mMUto2hu jAwSuFXzeT9fVWW2YCJw9fSD 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; 11 Aug 2021 07:48:32 -0700 IronPort-SDR: FW2A9nwsumXuB7d3+dsMhzbMUa3dVnRm/YhQq3H8QmwyKhnUwoIE+9mjJ90vUBmoi8M/GhIeOH LC4cTAMhlmE66f33DJ1iGeiyg+2YEeGv/Tlu15AdYOg+uw2wph+nC2sX7Ra8g3jrjx+0uuqJtF qjiWMwUs+NLkhjsKAY7bTmfmI1URKEUXtIacbhD3rjCIX0C2g/lP3gwyhLSsgpxSoevgVsc+/4 Lu8njxZH54qlhgxjYDThxh5XmB6C3+vD0LTlYGSnpz0VNJSnkWEoITzA1J3GQ25ZpbS0DKqcdx Lc4= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:13:02 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 7/8] fstests: btrfs: add checks for zoned block device Date: Thu, 12 Aug 2021 00:12:31 +0900 Message-Id: <20210811151232.3713733-8-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Modify btrfs tests to require non-zoned block device or limit some part of tests not to be run on zone block devices. Modified tests by the reasons: * Mixed BG - btrfs/011 * Non-single profile - btrfs/003 - btrfs/011 - btrfs/023 - btrfs/124 - btrfs/125 - btrfs/148 - btrfs/157 - btrfs/158 - btrfs/195 - btrfs/197 - btrfs/198 * Convert from ext4 - btrfs/012 - btrfs/136 * nodatacow - btrfs/236 * inode cache - btrfs/049 * space cache (v1) - btrfs/131 * write outside of FS code - btrfs/116 - btrfs/140 - btrfs/215 * verbose output - btrfs/194 Signed-off-by: Naohiro Aota --- common/btrfs | 18 ++++++++++++++++++ tests/btrfs/003 | 13 +++++++++---- tests/btrfs/011 | 21 ++++++++++++--------- tests/btrfs/012 | 2 ++ tests/btrfs/023 | 2 ++ tests/btrfs/049 | 2 ++ tests/btrfs/116 | 2 ++ tests/btrfs/124 | 4 ++++ tests/btrfs/125 | 2 ++ tests/btrfs/131 | 2 ++ tests/btrfs/136 | 2 ++ tests/btrfs/140 | 2 ++ tests/btrfs/148 | 2 ++ tests/btrfs/157 | 2 ++ tests/btrfs/158 | 2 ++ tests/btrfs/194 | 2 +- tests/btrfs/195 | 8 ++++++++ tests/btrfs/197 | 1 + tests/btrfs/198 | 1 + tests/btrfs/215 | 1 + tests/btrfs/236 | 33 ++++++++++++++++++++------------- 21 files changed, 97 insertions(+), 27 deletions(-) diff --git a/common/btrfs b/common/btrfs index ebe6ce269a6b..fb1a65842012 100644 --- a/common/btrfs +++ b/common/btrfs @@ -222,6 +222,18 @@ _btrfs_get_profile_configs() else local unsupported=() fi + + if [ `_zone_type $TEST_DEV` != "none" ]; then + unsupported+=( + "dup" + "raid0" + "raid1" + "raid10" + "raid5" + "raid6" + ) + fi + for unsupp in "${unsupported[@]}"; do if [ "${profiles[0]}" == "$unsupp" -o "${profiles[1]}" == "$unsupp" ]; then if [ -z "$BTRFS_PROFILE_CONFIGS" ]; then @@ -419,3 +431,9 @@ _btrfs_rescan_devices() { $BTRFS_UTIL_PROG device scan &> /dev/null } + +_scratch_btrfs_is_zoned() +{ + [ `_zone_type ${SCRATCH_DEV}` != "none" ] && return 0 + return 1 +} diff --git a/tests/btrfs/003 b/tests/btrfs/003 index d241ec6e9fdd..af0dc8a7e105 100755 --- a/tests/btrfs/003 +++ b/tests/btrfs/003 @@ -173,12 +173,17 @@ _test_remove() _scratch_unmount } -_test_raid0 -_test_raid1 -_test_raid10 +if ! _scratch_btrfs_is_zoned; then + _test_raid0 + _test_raid1 + _test_raid10 +fi + _test_single _test_add -_test_replace +if ! _scratch_btrfs_is_zoned; then + _test_replace +fi _test_remove echo "Silence is golden" diff --git a/tests/btrfs/011 b/tests/btrfs/011 index f5d865ab3d21..b4673341c24b 100755 --- a/tests/btrfs/011 +++ b/tests/btrfs/011 @@ -226,15 +226,18 @@ btrfs_replace_test() } workout "-m single -d single" 1 no 64 -workout "-m single -d single -M" 1 no 64 -workout "-m dup -d single" 1 no 64 -workout "-m dup -d single" 1 cancel 1024 -workout "-m dup -d dup -M" 1 no 64 -workout "-m raid0 -d raid0" 2 no 64 -workout "-m raid1 -d raid1" 2 no 2048 -workout "-m raid5 -d raid5" 2 no 64 -workout "-m raid6 -d raid6" 3 no 64 -workout "-m raid10 -d raid10" 4 no 64 +# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs +if ! _scratch_btrfs_is_zoned; then + workout "-m dup -d single" 1 no 64 + workout "-m dup -d single" 1 cancel 1024 + workout "-m raid0 -d raid0" 2 no 64 + workout "-m raid1 -d raid1" 2 no 2048 + workout "-m raid10 -d raid10" 4 no 64 + workout "-m single -d single -M" 1 no 64 + workout "-m dup -d dup -M" 1 no 64 + workout "-m raid5 -d raid5" 2 no 64 + workout "-m raid6 -d raid6" 3 no 64 +fi echo "*** done" status=0 diff --git a/tests/btrfs/012 b/tests/btrfs/012 index 46341e984821..3040a655095c 100755 --- a/tests/btrfs/012 +++ b/tests/btrfs/012 @@ -28,6 +28,8 @@ _require_scratch_nocheck _require_command "$BTRFS_CONVERT_PROG" btrfs-convert _require_command "$MKFS_EXT4_PROG" mkfs.ext4 _require_command "$E2FSCK_PROG" e2fsck +# ext4 does not support zoned block device +_require_non_zoned_device "${SCRATCH_DEV}" _require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}') diff --git a/tests/btrfs/023 b/tests/btrfs/023 index f6c05b121099..49ca95bc9efb 100755 --- a/tests/btrfs/023 +++ b/tests/btrfs/023 @@ -17,6 +17,8 @@ _begin_fstest auto # real QA test starts here _supported_fs btrfs _require_scratch_dev_pool 4 +# RAID profiles are not supported on zoned btrfs +_require_non_zoned_device "${SCRATCH_DEV}" create_group_profile() { diff --git a/tests/btrfs/049 b/tests/btrfs/049 index ad4ef122f3c9..a9cd5b2cf12b 100755 --- a/tests/btrfs/049 +++ b/tests/btrfs/049 @@ -27,6 +27,8 @@ _cleanup() _supported_fs btrfs _require_scratch _require_dm_target flakey +# inode cache is not supported on zoned btrfs +_require_non_zoned_device "$SCRATCH_DEV" _scratch_mkfs >> $seqres.full 2>&1 diff --git a/tests/btrfs/116 b/tests/btrfs/116 index 14182e9c0f49..2449e6e3a64d 100755 --- a/tests/btrfs/116 +++ b/tests/btrfs/116 @@ -18,6 +18,8 @@ _begin_fstest auto quick metadata # real QA test starts here _supported_fs btrfs _require_scratch +# Writing non-contiguous data directly to the device +_require_non_zoned_device $SCRATCH_DEV _scratch_mkfs >>$seqres.full 2>&1 diff --git a/tests/btrfs/124 b/tests/btrfs/124 index 3036cbf4a72c..5c05ffae1b8f 100755 --- a/tests/btrfs/124 +++ b/tests/btrfs/124 @@ -49,6 +49,10 @@ _scratch_dev_pool_get 2 dev1=`echo $SCRATCH_DEV_POOL | awk '{print $1}'` dev2=`echo $SCRATCH_DEV_POOL | awk '{print $2}'` +# RAID1 is not supported on zoned btrfs +_require_non_zoned_device "$dev1" +_require_non_zoned_device "$dev2" + dev1_sz=`blockdev --getsize64 $dev1` dev2_sz=`blockdev --getsize64 $dev2` # get min of both diff --git a/tests/btrfs/125 b/tests/btrfs/125 index e46b194d0139..de6651739f49 100755 --- a/tests/btrfs/125 +++ b/tests/btrfs/125 @@ -43,6 +43,8 @@ _require_scratch_dev_pool 3 _test_unmount _require_btrfs_forget_or_module_loadable _require_btrfs_fs_feature raid56 +# raid56 is not supported on zoned btrfs +_require_non_zoned_device "${SCRATCH_DEV}" _scratch_dev_pool_get 3 diff --git a/tests/btrfs/131 b/tests/btrfs/131 index 81e5d9bc90c7..f97e8f30666a 100755 --- a/tests/btrfs/131 +++ b/tests/btrfs/131 @@ -18,6 +18,8 @@ _supported_fs btrfs _require_scratch _require_btrfs_command inspect-internal dump-super _require_btrfs_fs_feature free_space_tree +# space_cache(v1) is not supported on HMZONED +_require_non_zoned_device "${SCRATCH_DEV}" mkfs_v1() { diff --git a/tests/btrfs/136 b/tests/btrfs/136 index 896be18d84f8..b9ab8270f039 100755 --- a/tests/btrfs/136 +++ b/tests/btrfs/136 @@ -22,6 +22,8 @@ _begin_fstest auto convert # Modify as appropriate. _supported_fs btrfs _require_scratch_nocheck +# ext4 does not support zoned block device +_require_non_zoned_device "${SCRATCH_DEV}" _require_command "$BTRFS_CONVERT_PROG" btrfs-convert _require_command "$MKFS_EXT4_PROG" mkfs.ext4 diff --git a/tests/btrfs/140 b/tests/btrfs/140 index f3379cae75de..a1a465cc8e5d 100755 --- a/tests/btrfs/140 +++ b/tests/btrfs/140 @@ -26,6 +26,8 @@ _require_scratch_dev_pool 2 _require_btrfs_command inspect-internal dump-tree _require_command "$FILEFRAG_PROG" filefrag _require_odirect +# it overwrites data, which is forbidden on zoned block device +_require_non_zoned_device "${SCRATCH_DEV}" get_physical() { diff --git a/tests/btrfs/148 b/tests/btrfs/148 index 510e46dc0826..eb86df862d9b 100755 --- a/tests/btrfs/148 +++ b/tests/btrfs/148 @@ -18,6 +18,8 @@ _require_scratch _require_scratch_dev_pool 4 _require_odirect _require_btrfs_fs_feature raid56 +# raid56 is not supported on zoned btrfs +_require_non_zoned_device "${SCRATCH_DEV}" _scratch_dev_pool_get 4 diff --git a/tests/btrfs/157 b/tests/btrfs/157 index 0cfe3ce56548..d06acead25a1 100755 --- a/tests/btrfs/157 +++ b/tests/btrfs/157 @@ -33,6 +33,8 @@ _supported_fs btrfs _require_scratch_dev_pool 4 _require_btrfs_command inspect-internal dump-tree _require_btrfs_fs_feature raid56 +# raid56 is not supported on zoned btrfs +_require_non_zoned_device "${SCRATCH_DEV}" get_physical() { diff --git a/tests/btrfs/158 b/tests/btrfs/158 index ad374eba8c7e..dbe1036ae320 100755 --- a/tests/btrfs/158 +++ b/tests/btrfs/158 @@ -25,6 +25,8 @@ _supported_fs btrfs _require_scratch_dev_pool 4 _require_btrfs_command inspect-internal dump-tree _require_btrfs_fs_feature raid56 +# raid56 is not supported on zoned btrfs +_require_non_zoned_device "${SCRATCH_DEV}" get_physical() { diff --git a/tests/btrfs/194 b/tests/btrfs/194 index 9a67e572ef74..a994a429628b 100755 --- a/tests/btrfs/194 +++ b/tests/btrfs/194 @@ -59,7 +59,7 @@ for (( i = 0; i < 64; i++ )); do $BTRFS_UTIL_PROG device del $device_1 $SCRATCH_MNT $BTRFS_UTIL_PROG device add -f $device_1 $SCRATCH_MNT $BTRFS_UTIL_PROG device del $device_2 $SCRATCH_MNT -done +done | grep -v 'Resetting device zone' _scratch_dev_pool_put echo "Silence is golden" diff --git a/tests/btrfs/195 b/tests/btrfs/195 index 59b979704491..303f18b43281 100755 --- a/tests/btrfs/195 +++ b/tests/btrfs/195 @@ -36,6 +36,14 @@ run_testcase() { src_type=${args[1]} dst_type=${args[2]} + if [ `_zone_type ${SCRATCH_DEV}` != "none" -a \ + \( ${src_type} = "raid5" -o \ + ${src_type} = "raid6" -o \ + ${dst_type} = "raid5" -o \ + ${dst_type} = "raid6" \) ]; then + return + fi + _scratch_dev_pool_get $num_disks echo "=== Running test: $1 ===" >> $seqres.full diff --git a/tests/btrfs/197 b/tests/btrfs/197 index f5baf5b6066b..5f38df401dea 100755 --- a/tests/btrfs/197 +++ b/tests/btrfs/197 @@ -30,6 +30,7 @@ _supported_fs btrfs _require_test _require_scratch _require_scratch_dev_pool 5 +_require_non_zoned_device ${SCRATCH_DEV} workout() { diff --git a/tests/btrfs/198 b/tests/btrfs/198 index b3e175a25bf9..007445cb5cb4 100755 --- a/tests/btrfs/198 +++ b/tests/btrfs/198 @@ -20,6 +20,7 @@ _supported_fs btrfs _require_command "$WIPEFS_PROG" wipefs _require_scratch _require_scratch_dev_pool 4 +_require_non_zoned_device ${SCRATCH_DEV} workout() { diff --git a/tests/btrfs/215 b/tests/btrfs/215 index b45bd520b8e6..4a2933df6cdf 100755 --- a/tests/btrfs/215 +++ b/tests/btrfs/215 @@ -24,6 +24,7 @@ get_physical() # Modify as appropriate. _supported_fs btrfs +_require_non_zoned_device $SCRATCH_DEV _scratch_mkfs > /dev/null # disable freespace inode to ensure file is the first thing in the data diff --git a/tests/btrfs/236 b/tests/btrfs/236 index a16a1ce62d3a..8481d8f380d2 100755 --- a/tests/btrfs/236 +++ b/tests/btrfs/236 @@ -173,21 +173,28 @@ for ((i = 1; i <= 3; i++)); do test_fsync "link_cow_$i" "link" done -# Now lets test with nodatacow. _unmount_flakey -MOUNT_OPTIONS="-o nodatacow" -_mount_flakey -echo "Testing fsync after rename with NOCOW writes" -for ((i = 1; i <= 3; i++)); do - test_fsync "rename_nocow_$i" "rename" -done -echo "Testing fsync after link with NOCOW writes" -for ((i = 1; i <= 3; i++)); do - test_fsync "link_nocow_$i" "link" -done - -_unmount_flakey +# Now lets test with nodatacow. +if ! _scratch_btrfs_is_zoned; then + MOUNT_OPTIONS="-o nodatacow" + _mount_flakey + + echo "Testing fsync after rename with NOCOW writes" + for ((i = 1; i <= 3; i++)); do + test_fsync "rename_nocow_$i" "rename" + done + echo "Testing fsync after link with NOCOW writes" + for ((i = 1; i <= 3; i++)); do + test_fsync "link_nocow_$i" "link" + done + + _unmount_flakey +else + # Fake result. Zoned btrfs does not support NOCOW + echo "Testing fsync after rename with NOCOW writes" + echo "Testing fsync after link with NOCOW writes" +fi status=0 exit From patchwork Wed Aug 11 15:12:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12431421 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C137C4320A for ; Wed, 11 Aug 2021 15:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47C0A60FA0 for ; Wed, 11 Aug 2021 15:16:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232726AbhHKPQw (ORCPT ); Wed, 11 Aug 2021 11:16:52 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39986 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232999AbhHKPN0 (ORCPT ); Wed, 11 Aug 2021 11:13:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1628694782; x=1660230782; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Xfsbypqwh3KcoJ3yzQaSC5LUs06zuIK25HVL2c6JM/4=; b=gbsR5MvJYFiOet9nX8e+kZaUzb25O/5hXq2SfkDTqud3pYvCF9Vgo9FU 1H3F/HhJ6vWzA9DK3PCoXXM1aaxpe+AkTjW+YOPeMRdOURQSxe2l/lzZt 03MfcFgeXZWTHEVMtwyKTDK/qp3eFTIm0IpVw0x8Rs8wSbUc8jq08LFsA 4nz6FiyKAZPGmQiED48DrLJKR2n6CpkAmQV7Ass5nJcsf/tqJaJ+dEysI Tu0eCPUwyfxoAxegCxpYG9Y3JkUZR7dAR2ZvjnwoViDWgmiuiy/XtIkX4 6t1KJGVUEP3fSf2OGVc9bkpYQFuGCCav+oSM49mb7QRN/sxz0HB8pRAg1 w==; X-IronPort-AV: E=Sophos;i="5.84,313,1620662400"; d="scan'208";a="176942582" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Aug 2021 23:13:02 +0800 IronPort-SDR: mNXp1PrTCPBAnCsjKxWRRAScBHUSJmlec1JJ3MqCOhdOfqM1Jl55KUcbOL7jgN4ehQNOjFR8aF MCdX+ujWVX2CYdl3kiEwFKfkzY2Ioogsw5dV8eqzcdbPyvixTHFlm7VnWssYTzN7Upb9hIiQVA +xMBOE4t3MC62nrfmC4RU7SzQpbmLCBg7UcQaY5XdnHyPCMvkEWxrWvw9tSHmUrxc0tbEPp4rA MOYuw/35Yvv9cCzUkm8rImrbBgLrmS3RpOEQVbT1k5maht1nUFFvtJgHIkKoU7LufTxPYuR5eZ 9fuC01pBz0AgsAuoviyLWw2d 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; 11 Aug 2021 07:48:33 -0700 IronPort-SDR: BXYApj0OI66a2mhE9JtjYNcl8QoODjCXJvE4frH7A5blwo/loP0fZao5TXmYez/6ytQo8JAf49 v85mEz3s2dDDoW1/riavDd/xmUkiK5bnfgAb5dvAOjBmQhOd/3rb+Ws4v39NwpQilev2FT+vhv e1KPumAVt4/bBBtnbvCPkz/WGsM6iFX7oCzjKZgQE6cSztRvX+HUGYZIab7vvxcVFRt9HMkEva m2WgMSP723PoMlFDkE4n0Rg8Xu/L2Y9xuMwpUB442MYQNHCUVZwgLJL7/BrLLOdCCOe1s1P0gr ExA= WDCIronportException: Internal Received: from ffs5zf2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.58.251]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Aug 2021 08:13:03 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH v2 8/8] fstests: generic: add checks for zoned block device Date: Thu, 12 Aug 2021 00:12:32 +0900 Message-Id: <20210811151232.3713733-9-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com> References: <20210811151232.3713733-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Modify generic tests to require non-zoned block device generic/108 is disabled on zoned block device because the LVM device not always aligned to the zone boundary. generic/471 is disabled because we cannot enable NoCoW on zoned btrfs. generic/570 is disabled because swap file which require nocow is not usable on zoned btrfs. Signed-off-by: Naohiro Aota --- tests/generic/108 | 1 + tests/generic/471 | 1 + tests/generic/570 | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/generic/108 b/tests/generic/108 index 7dd426c19030..b51bce9f9bce 100755 --- a/tests/generic/108 +++ b/tests/generic/108 @@ -35,6 +35,7 @@ _require_scratch_nocheck _require_block_device $SCRATCH_DEV _require_scsi_debug _require_command "$LVM_PROG" lvm +_require_non_zoned_device $SCRATCH_DEV lvname=lv_$seq vgname=vg_$seq diff --git a/tests/generic/471 b/tests/generic/471 index dab06f3a315c..66b7d6946a9f 100755 --- a/tests/generic/471 +++ b/tests/generic/471 @@ -37,6 +37,7 @@ mkdir $testdir # all filesystems, use a NOCOW file on btrfs. if [ $FSTYP == "btrfs" ]; then _require_chattr C + _require_non_zoned_device $TEST_DEV touch $testdir/f1 $CHATTR_PROG +C $testdir/f1 fi diff --git a/tests/generic/570 b/tests/generic/570 index 7d03acfe3c44..71928f0ac980 100755 --- a/tests/generic/570 +++ b/tests/generic/570 @@ -25,6 +25,7 @@ _supported_fs generic _require_test_program swapon _require_scratch_nocheck _require_block_device $SCRATCH_DEV +_require_non_zoned_device "$SCRATCH_DEV" test -e /dev/snapshot && _notrun "userspace hibernation to swap is enabled" $MKSWAP_PROG "$SCRATCH_DEV" >> $seqres.full