From patchwork Fri May 21 04:58:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12271877 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.5 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=ham 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 D74BAC43460 for ; Fri, 21 May 2021 04:58:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFE926138C for ; Fri, 21 May 2021 04:58:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233049AbhEUE77 (ORCPT ); Fri, 21 May 2021 00:59:59 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:33623 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232498AbhEUE76 (ORCPT ); Fri, 21 May 2021 00:59:58 -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=1621573114; x=1653109114; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mPGgMAweEGvRR91DavcmPlyA9iS6PleDUIzgcMY0930=; b=qFHIXWJqaxViVFp2JtQQuRurLwFgPzTBGzio92qEw+ZOfmOzBlPRmJut xhm+hzTfvTVDm7GNjCmCciBjcO485/HiiUxprSMS4d+CxvqWmCrblAoZ5 +ihX1rj+1YDVniGQBDFkZIQOyxnhmo3BzSktsTdZbuldlI2SqdCHerDGJ XjUBffOqM1HdH1GfG04Xi/7shFCmkE5/p/pvKNLnSieGpg0RTxepxVFpf nEqHHmUJ4jpTqT+MqeGVWBnHOzCFy/AbrESp+gOUqTn6LC8qXTp5FVI0A BOG4NemkK8arcb4fObw5c6crWMo5PLz8MoYXzk9iYHs5w26v2YvqcB9do A==; IronPort-SDR: v23UgeuDovguCvOUNxyxFcfVxB78L0nOfo4YFHYjGcLpwVmxSrZGlaHLJFhObli9QdxsOPgxX7 WUmvY4jJafhY1Fo+0QAti/LEbVwbzyFrb202dw5Fti5BePxvHRSMEbNzE4i7aGmXgeGyloJV9d dS6kDtjd5PHAallZjHCKiRy5UDhelkAD+O1fbOCww2eS+/389TOJ4zfHuV42M3P2HlN/+K+MFX TKo6gPcLyscvw8HiYAqKRxj8uaxvjVxHtZMgtFeq8liGp3O0/RiP3UoMNhDEc3hgg1maahoyAR WnM= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="168955585" 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; 21 May 2021 12:58:34 +0800 IronPort-SDR: q0ec/fyrYYh8xOF8IUF3Ssf4IYncV3cViSOcLuA5vJogSs7bm+k/vbBHkoj3STeeHQBo0PKwJV fBq6+rhyqrHt2t8ifjAcJ+bPEQmTkRIXwjjTUQ+N1t0feAMW8fFEQ6Vz3nf7qxnplw8KC8Rwok 2YE8Z7yqe7PMmM3H1iDCWphXcTnsKVrE55Gr3HaieJxS+FdXek/Qg3b0wBclxCJlos4fsyUfNY bMpZ05WUZR2u43EZGSM2Qp4H7LrSrsAODaiqNOh947tUtKDjWEt/iiQP5X8qeNR541XLHZ7JSB z6xib/TyhXltmW1t/shl9yPt 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; 20 May 2021 21:36:59 -0700 IronPort-SDR: AWR4TYUiikVOA06yxx/ryFrI88w8fjONnJY4tgj/XAQOm6uBKQejqvK0K/qvpFUV9j0I0aKLQX Ytuby/L+pXN6Fc314roDf4hFwnSLdX6qilbhmEKV+2QbZlj2qXLMoIhzeseWXMyNGVDgLabOHt qT/ov5baYpN1YZ6/OcGsugN3iMGiAeKcvslexARXdbh9zV1Eb9kcmxpAuSYhIPcCanjcwo9vMH DPxiDnyUZor/LQQKfcDfetiJE5JbRyTUC+uncnuta3ud8e0N5xtK617WJSasTEKpQ0nUCj2JyQ bNk= WDCIronportException: Internal Received: from 9rp4l33.ad.shared (HELO naota-xeon.wdc.com) ([10.225.48.75]) by uls-op-cesaip02.wdc.com with ESMTP; 20 May 2021 21:58:36 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH 1/5] common/rc: introduce minimal fs size check Date: Fri, 21 May 2021 13:58:21 +0900 Message-Id: <20210521045825.1720305-2-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521045825.1720305-1-naohiro.aota@wdc.com> References: <20210521045825.1720305-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@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 048491a68838..a7888281aa09 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 b18cf61e8a96..9a8458d4a3b6 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 Fri May 21 04:58:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12271879 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.5 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=ham 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 C51E5C433B4 for ; Fri, 21 May 2021 04:58:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4FBD61074 for ; Fri, 21 May 2021 04:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232498AbhEUFAC (ORCPT ); Fri, 21 May 2021 01:00:02 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:33623 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232956AbhEUE77 (ORCPT ); Fri, 21 May 2021 00:59:59 -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=1621573115; x=1653109115; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GPKlneebGRfzv1TU74qOb8uhhF4+ljzDSNaTz9A4GvU=; b=mh3I6FQFim5JPngBmzCigZvbYBR+xx4OAGpayw7eOmkTwxCojOhY+sTV 1KZjxUUQq6MdVgmoAj7Um6m6GyTZMjXhIYkXehJSnihNYNG5Qj08oNWUo BPhAIZyfYG8p7u+VVimABVsX73ZFudYsAwyiKfjYREQAHa3qnxdDmjg9E LJVI4jIvBaT79g/GKkdam60/NtH2In79+TzATdeLP3I6DItadRslkB/d7 /SZAQ/XzgT5tGjWwKmGagjGxaH3rjV/cU6re3mB92plx0mxX8jvMMagei Z7C8qf7OARsRh/ZAMrZ8Z2ip+uDa1qBlu9h20vBgMMJk0DbTsU7Ia0eiY Q==; IronPort-SDR: 86WoBdxNE9M78ZRKrQ1EGKP9YvZXwedh19CxMwV1J9dWoO70lQVI9Is7mGnUEqbZ2TRdFjFUnb 0Gy7Lxe9JL122Cf3vSdYFqt/WpEbhh5lWNJqDkxtS4/AeTZWJ3qYS1/TMrUsD10b7TS8tXHpFk +2XEcwd8s7p/97MaKrV9eISjCWGA75xE9IOnICK8g+TCZ5zCaQXB+N4Yls+TmUQ8fp9FArHWl9 KmZM3SdtB5mpnxtfho/vcliWEXkzep9+Jys2pjOm7eq3M+zgnz3yBJR4dVhrTA1TGQUSdna8Q+ /sU= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="168955588" 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; 21 May 2021 12:58:35 +0800 IronPort-SDR: PKGcKz0qr4v1RxhcF1i2qfHVmFcf/+jy023nLAsb9NMHr/s83CBw4OeEnWxxcTTz6XbkuSDQTY SH0M0JSwfHPeAXPDiib541u07L18OCaWmOUk5Jmf4P7Kq+oLtu2mjYT/SiGLAO6jXcFBfBhoWS QSzJvDXU2AAW84XfVxePbcNG4S5g+/zctN7T1NshNzm2mYctJHoG1WQ7aWlHYAIjY0SFv5UOO0 cBy2ZGSdAhJEzpZwiiUSRgQN2baPlqIomKP2FuAMtwCzASLMlsI6+HGXS0FrOT8825X+UPeinT KrFwq6/Jo1sL7RexmDTp64C0 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; 20 May 2021 21:37:00 -0700 IronPort-SDR: BWi14BB6BBcCRfvR0Le93yYKJiNB3YXYtkYAQUriq3lnw/jTje/51R8G56PrFc95daZ2R52pAx DKfF5p8WTLsPN6Gb6fHRNKJsgucpzZn6qaa3Uy/b7Qel8P1T9NqfCFUyREhjaptLyGuWJnkOwD lsOHwNHZX+8p1IxpkjLUJL07HfPG0pOP0H+Axj8PzfxZ9kE6jpL5Cwe4P+SBz+g6ZYmpNd6KHZ o+KpqP839QFHLbY1n8sXjzQ5+SqLliMQw76qRyxX/I2VM8glYqC31ozRGyygYnnSABDH4wzOrt 6nM= WDCIronportException: Internal Received: from 9rp4l33.ad.shared (HELO naota-xeon.wdc.com) ([10.225.48.75]) by uls-op-cesaip02.wdc.com with ESMTP; 20 May 2021 21:58:37 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH 2/5] btrfs/057: use _scratch_mkfs_sized to set filesystem size Date: Fri, 21 May 2021 13:58:22 +0900 Message-Id: <20210521045825.1720305-3-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521045825.1720305-1-naohiro.aota@wdc.com> References: <20210521045825.1720305-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@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 bf9ab14a89b2..e2c651911ded 100755 --- a/tests/btrfs/057 +++ b/tests/btrfs/057 @@ -31,7 +31,7 @@ _require_scratch rm -f $seqres.full -run_check _scratch_mkfs "-b 1g" +_scratch_mkfs_sized $((1024 * 1024 * 1024)) _scratch_mount From patchwork Fri May 21 04:58:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12271883 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.5 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=ham 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 0E4C9C43460 for ; Fri, 21 May 2021 04:58:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD8C4613BB for ; Fri, 21 May 2021 04:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236178AbhEUFAD (ORCPT ); Fri, 21 May 2021 01:00:03 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:33623 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232596AbhEUFAA (ORCPT ); Fri, 21 May 2021 01:00:00 -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=1621573116; x=1653109116; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MF2LJE+HSh/d2JlhawBe0V32G0zPYLXgSPA8047NK8g=; b=WzzYpinJHOCDcDlBHwGD5lMOq1HndEPTB2dEeIEuYyhzy63TahxHynF1 jAaR5PoGcmoE8Jnay5ScTxghhEI4CqKjYm6zOwq/uJuIbL535Bn9yGBFY m5Ll/7fAqdFyg5vLmeJzc1Ukv1FLlpxoixrbUT88eJTpvP3w/LVwZ165b hPGN4anJgyIlbRfL/9EaWzaQQuMEfyoqJQy1ZFIRccJFxHWn1rqsiJjnu 1hr2VRHBCvz9GNDrbfF+lvKFCnVJoGTS5YXqMDoKk/VCK/5bB5xODDWAM SR1eSjxI126ao1S6lg4j5O1iHi4mxbkv4i7Hke8lngV3hxjXdizb8+JJ9 A==; IronPort-SDR: pqKntqq8NbAGCKHCPnv5Ud2giX7gvEWewbHuIVIWptfLI7+FltVsvi/52j0obejXNviyPnG2+C dKfAHixqxXRlAKdQc2i+aGk8sM9eMMq9+42bJJWInUNS5fE/7cV9Uz53Tx9uWhR/BCE3NphigE igCMYoOH2ilILOGDnxItpzetE6CeLlo5IokiBlzSC7Xe7M0VbAAaJATeL6TqzRw4owI0X+ENBW pvV0XlnaaPZjwM1g79aBBzohIKDxksp24Gw84esDdlFM+ptoQ9kT/MQskQskZolm3WRuVpoDfB 4r0= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="168955589" 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; 21 May 2021 12:58:36 +0800 IronPort-SDR: SeqF+LyqKL+fl0ODr/fvncYJZmaMBCAoiLrIXqvz9NKABiQtjNOt4QDo2g9bbwkBSVdy8mTFmr Vy/uCueSRkar0S1QX8h9Xww9A+TohtpYOqNLJwJ8Cx7cA+IZ1wdWE8VT6sSmAp/rqC8ZYJyJRx o0EaOqgGXiLB8R8D7wkxWPEAs+UsK6vlcmfQ2X2gkLNmkgoagFwM889C2ah+WZ0+GUkiD+GySv GDuWuetThCC0GWpvVpMySwcEKO7WZFI1Qm0uS4Rk83FkDpKMtXJjL6bhq8Seoel5msiMvjODfC 1Tt6Hm2+L+C1yLHKAXBlrwFG 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; 20 May 2021 21:37:00 -0700 IronPort-SDR: QK6cN/jwHBWq2Z8904Zx+PSqmMnm9a53azs0R5NfedizsQ5OHP8lT/JIXIGHGGVG/ah2nm0cIO nUY8TpfQWZ3PrYPaOfo24swqMHRAjLKDUvExN9ELlHIADthtMLeGg/+ziX/RnM3L6amTnIxr6D eXxLdCRvvFbsTfHnBIrIG7drERXY07X+iYUKn6nycJ5kuMr1CS0P+q8le7o+SNZrSRAyiOLrYm 64xdAgQ3NyxRJuWNfOsPx+hJ5wtLdDRSppCTgOCqkv8wnp5Kf4vxTuFrEzGpoEeqrluIiqEfD8 T7U= WDCIronportException: Internal Received: from 9rp4l33.ad.shared (HELO naota-xeon.wdc.com) ([10.225.48.75]) by uls-op-cesaip02.wdc.com with ESMTP; 20 May 2021 21:58:38 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH 3/5] btrfs: add minimal file system size check Date: Fri, 21 May 2021 13:58:23 +0900 Message-Id: <20210521045825.1720305-4-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521045825.1720305-1-naohiro.aota@wdc.com> References: <20210521045825.1720305-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@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 bc4ba52d011d..409cb8ee4099 100755 --- a/tests/btrfs/141 +++ b/tests/btrfs/141 @@ -71,6 +71,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 c8660fd60e5e..e7170cb4e20b 100755 --- a/tests/btrfs/142 +++ b/tests/btrfs/142 @@ -49,6 +49,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 88fdbe60c123..399146063c40 100755 --- a/tests/btrfs/143 +++ b/tests/btrfs/143 @@ -56,6 +56,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 0840e0a0cc7d..12826dc0469e 100755 --- a/tests/btrfs/150 +++ b/tests/btrfs/150 @@ -59,6 +59,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 cd18f895fd69..d363874f491a 100755 --- a/tests/btrfs/151 +++ b/tests/btrfs/151 @@ -39,6 +39,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 89c80e7161e2..9126dbab1dde 100755 --- a/tests/btrfs/156 +++ b/tests/btrfs/156 @@ -53,6 +53,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 e7118dbcad0f..e90349b8ce16 100755 --- a/tests/btrfs/157 +++ b/tests/btrfs/157 @@ -76,6 +76,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 803d6b9ea37f..e5bf2f102e15 100755 --- a/tests/btrfs/158 +++ b/tests/btrfs/158 @@ -68,6 +68,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 94f56284a717..75704c43e27d 100755 --- a/tests/btrfs/175 +++ b/tests/btrfs/175 @@ -29,6 +29,7 @@ rm -f $seqres.full _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 Fri May 21 04:58:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 12271881 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.5 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 D0F3CC43461 for ; Fri, 21 May 2021 04:58:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4FBD6138C for ; Fri, 21 May 2021 04:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235869AbhEUFAD (ORCPT ); Fri, 21 May 2021 01:00:03 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:33627 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233661AbhEUFAC (ORCPT ); Fri, 21 May 2021 01:00:02 -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=1621573117; x=1653109117; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XaiGk7DPa4yauZ2+CAQdUSL1Nno7tKoh6bHxWLJe3PU=; b=T1LqI2VUHg05zUL/brPmZU93K3SJvIAXJ7paJM9C0SbQ26lWltjofPo9 9ozNxKKOtrhs58ABMQO++4fxbV8+ROfC/V3f3JFSY/O2GpQd+xfBAnF8u 88EIWxLsnuFWLAd37D2cOlQKQK40/dOnPau6WM/8ksojkB7tw/IWckt4M hl2by6RYfP4nnbQgZUxpTICdoOT4ur+6KGWCf1iY/d4ZkDNZWL8ZyRuN5 ZhFFUezmBlICETCCmAU2BTWTos5PVRlq7m0YsjxiBgB/ZwHsrX3nBMnwT hAgIaLTZw+LCInYBk3DlYKE6nAg6Lr7A8LE2eBiQH/rj+NBd7tSKpPaaW g==; IronPort-SDR: wC4wzxhOHZ+YJ827pblKCFltqUzuiIgBCmEIV2bqD1+qgl+eKWmjYb84oPNLU9VEn/s/yVd2T/ sJ8jWU6JHsL6+wy8/Ohtsq0kJ8DvaI0KnZxPNLrNCni7jfeUUoM8pdbmZERAQaKeIrDVrJkc5m ygc5MkozOOpfDlvsrSleJBpnskeSrGb/5wTul29i7XkFGuA21qNPqfb+3s/4rmgheOA5ctPUmJ CDoMhhqYjiMn7sKkxkCkX22rC6kSf3ws3jm3Ft/uVcZ9cfHI6aQFwUVeJ/OmKu2RT2TpVEUpsJ nqk= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="168955591" 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; 21 May 2021 12:58:37 +0800 IronPort-SDR: y+jo2P2O3RcCV3AEo3TM2Q/zzySRS2xv78PI2BVKW17yzLZ4PqZHfQ/G/iTzjKWGdasb60PpZc fngicsw3KF8ao71Wro8FkR03hbyWcDxvxiPRHA5BCee+aGsXZUEbxaFADtIYtYWJ8zgN/dmg1H 1OXit8LG92ngiEG4LMLXait4FvWUClwGLd3dNKrTkr3zr3NMDaNmZ2nCloF1YI0GSkLkmrGwCh TLiOg1O5WMnZPmGAKw6nNNJXdLqH2qzaAl0FVPSBmwE14HplB8IBSzIaDN4gW0u3MTh8f3T0wv mMdp99TnkQk73NRA3w+P/X3z 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; 20 May 2021 21:37:01 -0700 IronPort-SDR: P+cYQJS9arhUjNOyoTa6zx3nRlrq3ED20ofHlt34PHEPlMLjOojA1yjcBJk7Jm6K3+Y+fB0Ce8 swAQsUmNJRcHkgJS/KJhWSF13sUIc2GEPaOgj5Fl1C+0IP0KfEbAlg/AYcVtNWsws/IhLKvjs0 U23mjlRiL53JuPCZNMVdwsPyssxk05JJXudAltWzCp0mR4bUZdSzOj8QAL9CMcXu4SOL61sz20 u3Nyjba7W6wLW724o88/on5RXv46Vw0tjSRKt2RyhUblVWS/+N7zZ8HmA9Vhu0aZ5X4Vw0EARx QuQ= WDCIronportException: Internal Received: from 9rp4l33.ad.shared (HELO naota-xeon.wdc.com) ([10.225.48.75]) by uls-op-cesaip02.wdc.com with ESMTP; 20 May 2021 21:58:39 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH 4/5] common: add zoned block device checks Date: Fri, 21 May 2021 13:58:24 +0900 Message-Id: <20210521045825.1720305-5-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521045825.1720305-1-naohiro.aota@wdc.com> References: <20210521045825.1720305-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@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 | 3 +++ 3 files changed, 9 insertions(+) diff --git a/common/dmerror b/common/dmerror index 7d12e0a1843c..84d2c338df11 100644 --- a/common/dmerror +++ b/common/dmerror @@ -15,6 +15,9 @@ _dmerror_setup() DMLINEAR_TABLE="0 $blk_dev_size linear $dm_backing_dev 0" 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 9a8458d4a3b6..55cd8e8df8f6 100644 --- a/common/rc +++ b/common/rc @@ -1812,6 +1812,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 From patchwork Fri May 21 04:58: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: 12271885 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.5 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=ham 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 32790C433ED for ; Fri, 21 May 2021 04:58:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14D1C6139A for ; Fri, 21 May 2021 04:58:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbhEUFAE (ORCPT ); Fri, 21 May 2021 01:00:04 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:33628 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234175AbhEUFAC (ORCPT ); Fri, 21 May 2021 01:00:02 -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=1621573118; x=1653109118; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SrFjFY56fR+Rp22UAHX43bKEVCdx/FdHUM8fBb3hNus=; b=VPfewvVGpk8Fh9JfThicgvITfwtDxo358mBRjDSNSIbZ3Ey6iAjE7IYq tb0/zOAHOV2HdO+9U9P/RFbvw79FGL5gXCF2LqRDQJeAQNTpPw3Wn4EAt mkUV0KNjAjOxtO4auOe33PGcWOiDvDaiPxvjBmaan0AWBnHnwFu/9Qyfu nkVTv7lxA74qDTx9PAJFWETdRAYnEifPOJ6J2RQPUzrEg7PUAeLI7PGI+ bX/S/88ChNSoEJXuMK+D0GYrPO6IYmlfoOLZE9C0AZiMFcVoNIp+89fjb J+WLrNdn/ewfzZGRU9BENZ9jSq2Mvf4gFw28ulug7cPYmpM5rWNZnTCYS g==; IronPort-SDR: /xaIB8mAx+oOHh9eldnY6aDZbSz27N7DTC9AVcNt/AdUruUumBiflCa8+zCiVBRZ73a9/dHJjQ tkqc47ZtGEILB4UOvoyKmoDD/j88TcrrHCDOOoMhrt2w8v0tB7TNsxvdoehuGqqPwmbFRViU/K WnWzkMZPMAHVMmPxtb/18FVhSQnkwX/UZ4h788S/anFrp9sqPMrrrCe93uLbEkJ2ICghsMLfNH x+zp+t0TeEaqLwS6sRTg7V2SYGQFcZqdlQpp2LEZBR28xuRltxw7tX8eGkam24Hwy+nS9Y+ro2 Wpk= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="168955592" 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; 21 May 2021 12:58:38 +0800 IronPort-SDR: edtZB23USbtceAITH6G+RtiVr/J4gUaWmuCBXFnzxZZUxFV6Qad79+cVm3inVStt/y1zfIkadB gMW14vlhwxIb7z2CjQWvU0au8ujruNaAsuBvc+i7Sm3fmfTvJB1uksGHAlyiDw3GAG6TtkR/r/ 2Op9qnSaEVkGp5D12++h+ycN1IlSdV3crEVGnoWb2lViSrE8D9tC6eQlQ+0fBrkHwyZ9cqz0Q6 UsI1jKA58T8Vtg/+0MuzLKyIH5bfmefA0vgZAO4n6KvqCX1isV9WF2o8ek3zLzdIBYgbwItiNl Ncae6KPIZqMqu2lsLiD+uBdJ 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; 20 May 2021 21:37:02 -0700 IronPort-SDR: 64OVi2vKgFGMYpKgonKeeiu2FblrbDfuAL47mSRxUL374ggoRpwR1nG2qEJxNNsjLf8bC8gvy4 vjWag2nNU6GSfsV/8C3qgvzWktqiykiNSBl/xnMHSl8ZerppNSD1SySq6SZ7mYCUXlqQ0Z5+cI T7yVeLJ2AISWw3M8qfN2HS5BQFzLiy9dlTaV1tTKklP5flEvFoC1+TkY+C05e6uhoikXeyUCtX v0zHoFxejpjlA0BKEXNX83JbJbgkftEvivlBB+odh9bCjYHCKOj8uBPt9swYV2ngDMcc9xD3RS ODo= WDCIronportException: Internal Received: from 9rp4l33.ad.shared (HELO naota-xeon.wdc.com) ([10.225.48.75]) by uls-op-cesaip02.wdc.com with ESMTP; 20 May 2021 21:58:40 -0700 From: Naohiro Aota To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Naohiro Aota Subject: [PATCH 5/5] shared/032: add check for zoned block device Date: Fri, 21 May 2021 13:58:25 +0900 Message-Id: <20210521045825.1720305-6-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521045825.1720305-1-naohiro.aota@wdc.com> References: <20210521045825.1720305-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@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 360087ee1fb9..31ac52303dde 100755 --- a/tests/shared/032 +++ b/tests/shared/032 @@ -25,6 +25,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