From patchwork Wed Apr 14 01:04:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201653 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 2FA41C43460 for ; Wed, 14 Apr 2021 01:04:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09E0F613C1 for ; Wed, 14 Apr 2021 01:04:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348953AbhDNBE6 (ORCPT ); Tue, 13 Apr 2021 21:04:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:37836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345256AbhDNBE5 (ORCPT ); Tue, 13 Apr 2021 21:04:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C8C68613B6; Wed, 14 Apr 2021 01:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362277; bh=cgiDZ13ABBPC9pI4equNCaYoOg9yWAJ0nyzpEr46KGU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=urqwu7jjm7vMw8SeDyt4OwBmJyK8bKBhGA0Im0GRUwmXwR9BTV9VNlKFJNu/41KwO V41ZYlFiO2mEwujp17jTlmwtqZ4tv6hGoV/4fAaMBlWUgXjb23v7GixrsXq4h6TU1h Z1gdRu8GNWXrMaxmez88/0XhWVIwk/zULrrzo5JCLwX+X69YE6piFJ+MdVyEIpCwCe kwISRrVN8aOxcrXHpmhSLCkREmNyCAKUJBl0nbQUDi5hqR448RcBWwr2dMA2v0SixP VMBQimYOiESBSUAT+L9z8i+gBa5bJekz0/QoiqTgEUtX2SzNJKxUavJ61t2goncPyq 1VuL1c3DH9+qg== Subject: [PATCH 1/9] xfs/506: fix regression on freshly quotachecked filesystem From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:04:36 -0700 Message-ID: <161836227616.2754991.13243990456152675669.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong The first thing this test checks is that the health command reports that nothing has been checked. This isn't true if we regenerated the quota counts when we mounted the filesystem (and hence they're marked healthy and checked), so cycle the mount to get rid of that state. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/xfs/506 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/xfs/506 b/tests/xfs/506 index ddda8614..7e553849 100755 --- a/tests/xfs/506 +++ b/tests/xfs/506 @@ -36,6 +36,7 @@ rm -f $seqres.full _scratch_mkfs > $seqres.full 2>&1 _scratch_mount +_scratch_cycle_mount # make sure we haven't run quotacheck on this mount # Haven't checked anything, it should tell us to run scrub $XFS_SPACEMAN_PROG -c "health" $SCRATCH_MNT From patchwork Wed Apr 14 01:04:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201655 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 F0203C43460 for ; Wed, 14 Apr 2021 01:04:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD6A3613CE for ; Wed, 14 Apr 2021 01:04:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348954AbhDNBFE (ORCPT ); Tue, 13 Apr 2021 21:05:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:37872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345256AbhDNBFD (ORCPT ); Tue, 13 Apr 2021 21:05:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D6AB1613B6; Wed, 14 Apr 2021 01:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362283; bh=Q9aUOqxIhO69rVteC88rMmwi+RM/8L0Kplu/0cIU6t0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=LMb8A6Enf9nqXID8nn0PfWeV6ccwpcY0a0TXwDhHCsDpviHKpnSKjkv1HWhGTJSS6 KivCIv3chsHROOADAky4DcyNmdKUhUTvlh7q8GWfPTt8w+gaAs6PzvSctkRcKP3jLB qH9tPzEFs+IQkJQT9Nwf1WVbsH57qbHh9+Et0+hGHE76GazWuqKJP8vApS0D5VDCYk hDOoQjBSzuIOSKqz87TorCjpyuvR8KjwJQAzcov9JBOAAxNHSlhoHKl7Fco2OgDVwJ hs+e7tuEleWrzPA0ebY+1rHVBokxsAoQ+D1FW+6hs4S6wqwvBZClYr6jfixihaHyiE kmAUE2TudHd3Q== Subject: [PATCH 2/9] generic/563: selectively remove the io cgroup controller From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:04:42 -0700 Message-ID: <161836228218.2754991.5899063640535008629.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong If a system configuration tool such as systemd sets up the io cgroup controller for its own purposes, it's possible that the last line of this test will not be able to remove the io controller from the system configuration. This causes the test to fail even though the inability to tear down systemd should not be considered (in this case) a failure. Change this test to set the "io" component of subtree control back to whatever it was when the test started. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/generic/563 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/generic/563 b/tests/generic/563 index b113eacf..fe7394c0 100755 --- a/tests/generic/563 +++ b/tests/generic/563 @@ -103,6 +103,9 @@ sminor=$((0x`stat -L -c %T $LOOP_DEV`)) _mkfs_dev $LOOP_DEV >> $seqres.full 2>&1 _mount $LOOP_DEV $SCRATCH_MNT || _fail "mount failed" +drop_io_cgroup= +grep -q -w io $cgdir/cgroup.subtree_control || drop_io_cgroup=1 + echo "+io" > $cgdir/cgroup.subtree_control || _fail "subtree control" # Read and write from a single group. @@ -143,7 +146,9 @@ $XFS_IO_PROG -c fsync $SCRATCH_MNT/file check_cg $cgdir/$seq-cg $iosize $iosize check_cg $cgdir/$seq-cg-2 0 0 -echo "-io" > $cgdir/cgroup.subtree_control || _fail "subtree control" +if [ "$drop_io_cgroup" = 1 ]; then + echo "-io" > $cgdir/cgroup.subtree_control || _fail "subtree control" +fi # success, all done status=0 From patchwork Wed Apr 14 01:04:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201657 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 B9AABC433B4 for ; Wed, 14 Apr 2021 01:04:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EE94613C3 for ; Wed, 14 Apr 2021 01:04:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348957AbhDNBFK (ORCPT ); Tue, 13 Apr 2021 21:05:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:37914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348955AbhDNBFJ (ORCPT ); Tue, 13 Apr 2021 21:05:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D16B613C0; Wed, 14 Apr 2021 01:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362289; bh=NlCVr1nnQvGnwftU1uPqeOEIoypN0RecoAkuzE9lFbw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=m8WZS7EuctfwnIXPtDtV7FrLhSSXDsBuEbse3dDJ0KvsPm26mGUMBk3K4rbxDNVdv Rd36i618RCO2ojf6k7q0w+Gp21mQ1AdBs9v+qa+4G13GhccRroDcHCez6ZYYNaZwwt CbGJ+6SJ0HkCXlyxApBEV+4lkYGDjGBKgBjNhH1k+wUa3j1cCzyqyjjvjejMFuipGW G1/cy8dyJ4k3oG2yULQC5DBRKP+RaEF9kcVYgjqjo6qmNnqzL7Yr+AT95DFxiqJEGn IF3MpRvwSVew9SXETcgGn3czj+NWCilxzRJYE4mSG23TZ6PUQbrMrNNPl53+kqooFk oNA31Ea/Y+0oQ== Subject: [PATCH 3/9] xfs/521,530: refactor scratch fs check From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:04:48 -0700 Message-ID: <161836228828.2754991.13327862649701948223.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Use the existing _check_scratch_fs helper to check the (modified) scratch filesystem in these tests. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/xfs/521 | 2 +- tests/xfs/530 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/xfs/521 b/tests/xfs/521 index e6c417b8..b8026d45 100755 --- a/tests/xfs/521 +++ b/tests/xfs/521 @@ -75,7 +75,7 @@ echo "Create more copies to make sure the bitmap really works" cp -p $testdir/original $testdir/copy3 echo "Check filesystem" -_check_xfs_filesystem $SCRATCH_DEV none $rtdev +_check_scratch_fs # success, all done status=0 diff --git a/tests/xfs/530 b/tests/xfs/530 index 65c17af2..0e4dd6b5 100755 --- a/tests/xfs/530 +++ b/tests/xfs/530 @@ -114,7 +114,7 @@ for rtino in rbmino rsumino; do done echo "Check filesystem" -_check_xfs_filesystem $SCRATCH_DEV none $rtdev +_check_scratch_fs losetup -d $rtdev rm -f $TEST_DIR/$seq.rtvol From patchwork Wed Apr 14 01:04:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201659 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 9C377C433B4 for ; Wed, 14 Apr 2021 01:04:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EFD3613C7 for ; Wed, 14 Apr 2021 01:04:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348958AbhDNBFR (ORCPT ); Tue, 13 Apr 2021 21:05:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:37948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348955AbhDNBFR (ORCPT ); Tue, 13 Apr 2021 21:05:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 76BCC613B6; Wed, 14 Apr 2021 01:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362296; bh=pbYuwrUWXL3AUu2acpNZ4vhttw1ifQap+9ZkRWLPkiQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=mZYLuLo95AUsETGAp2LkaRduHdAfW6vTmxRGlMwAB9qN09S4a5iKuWK7CMUp5fxvf CNo13e6JgLjkfeDzRB8MZSFssZDv8Yt0ovgLoOMAn12bHGpIN5xWpflyubrPwMDKZP lFX+ctgLq4J/YL7ms6UK1orfT21QilWoMrC8gXCOhZKaw0t1s+N6o+jWArWB3Ibzh8 RZydVhGllLlWtFQnxAA5RsA0aGwzbSKKLT4ZH7wezlCbg5Le6J4wc4M6dxodMCSHZB 2sAXOhs/BlMI7x47qt1+9rF5jNSumacGJyDW+Fl0GnCA6sp94ETenN1pCoPcdG7Vq/ LblzyzuSEQY0g== Subject: [PATCH 4/9] common/dump: filter out xfs_restore messages about fallocate failures From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:04:54 -0700 Message-ID: <161836229453.2754991.3539097521630217821.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong fallocate is not supported on XFS filesystems that are running in "always COW" mode. This leads to false test regressions because xfs_restore complains about EOPNOTSUPP in the golden output. The preallocation isn't required for correct xfs_restore operation, so filter out the EOPNOTSUPP messages. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/dump | 1 + 1 file changed, 1 insertion(+) diff --git a/common/dump b/common/dump index 2b8e0893..3c4029ff 100644 --- a/common/dump +++ b/common/dump @@ -866,6 +866,7 @@ _dump_filter_main() -e 's/id:[[:space:]]*[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/ID: ID/' \ -e 's/\[y\/n\][- ]----------------------*/\[y\/n\]/' \ -e '/skip attribute set/d' \ + -e '/xfsrestore: NOTE: attempt to reserve [0-9]* bytes for.*Operation not supported/d' \ | perl -ne ' # filter out all the output between the lines "Dump Summary:" # and "Dump Status:" From patchwork Wed Apr 14 01:05:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201661 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 DCEBAC433ED for ; Wed, 14 Apr 2021 01:05:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3D2B613C0 for ; Wed, 14 Apr 2021 01:05:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348960AbhDNBFX (ORCPT ); Tue, 13 Apr 2021 21:05:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:37982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348955AbhDNBFX (ORCPT ); Tue, 13 Apr 2021 21:05:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 898A8613B6; Wed, 14 Apr 2021 01:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362302; bh=EjqsZUn2gCOcc/Jzmdc2ETY7tPX+rao/NTlixxlN6D8=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Ho8GL/D23D9pwqUUQxtqjjewMnU2n+3X7wmHuiLZNzRVmKm0y11E170bJ7540IsX2 1MtNAKCaE47pHAb3ELDOuT5lzAbKGQtWlRVmIzLgXGpsnVxv9yiza8mXz6ChdApMpW B3QuvZ3FejOaqB21cacY0o/AElBJxNkJrQ7lfxEus9xXo2tt3C8AjMbjrN/4wWjjAK mqElqFbcEirlQwR6oC39IAcA8IE1iezsfd2EBPW/f3JCdXjzdoPLjKTabzjCINQpbV /UC2hFFe10HcO/95PEwL+Adxk1Wab2HJfNx7ywVGdJaj+Afm/leg+v+CMHKGMwI1ak B0bgVF9jc0PFg== Subject: [PATCH 5/9] common/dmthin: make this work with external log devices From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:05:01 -0700 Message-ID: <161836230182.2754991.16864806174255630147.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Provide a mkfs helper to format the dm thin device when external devices are in use, and fix the dmthin mount helper to support them. This fixes regressions in generic/347 and generic/500 when external logs are in use. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/dmthin | 9 ++++++++- tests/generic/223 | 3 +++ tests/generic/347 | 2 +- tests/generic/500 | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/common/dmthin b/common/dmthin index c58c3948..3b1c7d45 100644 --- a/common/dmthin +++ b/common/dmthin @@ -218,10 +218,17 @@ _dmthin_set_fail() _dmthin_mount_options() { - echo `_common_dev_mount_options $*` $DMTHIN_VOL_DEV $SCRATCH_MNT + _scratch_options mount + echo `_common_dev_mount_options $*` $SCRATCH_OPTIONS $DMTHIN_VOL_DEV $SCRATCH_MNT } _dmthin_mount() { _mount -t $FSTYP `_dmthin_mount_options $*` } + +_dmthin_mkfs() +{ + _scratch_options mkfs + _mkfs_dev $SCRATCH_OPTIONS $@ $DMTHIN_VOL_DEV +} diff --git a/tests/generic/223 b/tests/generic/223 index 1f85efe5..a5ace82f 100755 --- a/tests/generic/223 +++ b/tests/generic/223 @@ -43,6 +43,9 @@ for SUNIT_K in 8 16 32 64 128; do _scratch_mkfs_geom $SUNIT_BYTES 4 $BLOCKSIZE >> $seqres.full 2>&1 _scratch_mount + # Make sure everything is on the data device + $XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT + for SIZE_MULT in 1 2 8 64 256; do let SIZE=$SIZE_MULT*$SUNIT_BYTES diff --git a/tests/generic/347 b/tests/generic/347 index cbc5150a..e970ac10 100755 --- a/tests/generic/347 +++ b/tests/generic/347 @@ -31,7 +31,7 @@ _setup_thin() { _dmthin_init $BACKING_SIZE $VIRTUAL_SIZE _dmthin_set_queue - _mkfs_dev $DMTHIN_VOL_DEV + _dmthin_mkfs _dmthin_mount } diff --git a/tests/generic/500 b/tests/generic/500 index 085ddbf3..5ab2f78c 100755 --- a/tests/generic/500 +++ b/tests/generic/500 @@ -68,7 +68,7 @@ CLUSTER_SIZE=$((64 * 1024 / 512)) # 64K _dmthin_init $BACKING_SIZE $VIRTUAL_SIZE $CLUSTER_SIZE 0 _dmthin_set_fail -_mkfs_dev $DMTHIN_VOL_DEV +_dmthin_mkfs _dmthin_mount # There're two bugs at here, one is dm-thin bug, the other is filesystem From patchwork Wed Apr 14 01:05:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201663 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 467A1C43460 for ; Wed, 14 Apr 2021 01:05:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2DDB0613C7 for ; Wed, 14 Apr 2021 01:05:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348962AbhDNBFa (ORCPT ); Tue, 13 Apr 2021 21:05:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:38014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348961AbhDNBF3 (ORCPT ); Tue, 13 Apr 2021 21:05:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9EF3E613B6; Wed, 14 Apr 2021 01:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362308; bh=yVCTxakyZU3lgyVj63fpYJS/4nk3ZSvUiHgdX6m/wH8=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Wpu4oKDHk7Jl2+ymKFvSRFIXPJ5RuDiA5aCnWbpAoqjSmU78v8XqIbgCnZDrA8xA0 ua+QW2kWutzqYI6cz06m13jLRGJ1BvefGyFniLvVnplAhTLmW4hzLl03qy1cYQU2Wx JYQuMvkglG8kQhiLkOrFoPbXBvmZ69Ia8EJ3crWUGhozaJTPRZrGtcGT0JdzwUu/89 VVTMKE+JtfDojrTudYZIKwLcYlLYORjsvkGE8g8KtgSHTWQTuqeVxF42zOUm7l+pkH 2RQUvHpF4Rsq05xe6tAJgW0f+IFyRjCTtpi8eu0VPjmO7UZSrJWKS1CEXimEIZ5Reh zjYHopTyT6uaQ== Subject: [PATCH 6/9] misc: replace more open-coded _scratch_xfs_db calls From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:05:07 -0700 Message-ID: <161836230786.2754991.7641118311374470635.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Replace the last remaining open-coded calls to xfs_db for the scratch device with calls to _scratch_xfs_db. This fixes these tests when external logs are enabled. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/repair | 2 +- tests/xfs/030 | 2 +- tests/xfs/083 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/repair b/common/repair index 8adc2178..5a957f4e 100644 --- a/common/repair +++ b/common/repair @@ -10,7 +10,7 @@ _zero_position() struct="$2" # set values for off/len variables provided by db - eval `xfs_db -r -c "$struct" -c stack $SCRATCH_DEV | perl -ne ' + eval `_scratch_xfs_db -r -c "$struct" -c stack | perl -ne ' if (/byte offset (\d+), length (\d+)/) { print "offset=$1\nlength=$2\n"; exit }'` diff --git a/tests/xfs/030 b/tests/xfs/030 index 906d9019..81198155 100755 --- a/tests/xfs/030 +++ b/tests/xfs/030 @@ -81,7 +81,7 @@ else _scratch_unmount fi clear="" -eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne ' +eval `_scratch_xfs_db -r -c "sb 1" -c stack | perl -ne ' if (/byte offset (\d+), length (\d+)/) { print "clear=", $1 / 512, "\n"; exit }'` diff --git a/tests/xfs/083 b/tests/xfs/083 index a548be2a..a3f32cb7 100755 --- a/tests/xfs/083 +++ b/tests/xfs/083 @@ -108,7 +108,7 @@ echo "+ check fs" >> $seqres.full _scratch_xfs_repair >> $seqres.full 2>&1 || _fail "should pass initial fsck" echo "++ corrupt image" >> $seqres.full -xfs_db -x -c blockget -c "blocktrash ${FUZZ_ARGS}" "${SCRATCH_DEV}" >> $seqres.full 2>&1 +_scratch_xfs_db -x -c blockget -c "blocktrash ${FUZZ_ARGS}" >> $seqres.full 2>&1 echo "++ mount image" >> $seqres.full _try_scratch_mount >> $seqres.full 2>&1 From patchwork Wed Apr 14 01:05:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201665 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 DDCCEC433ED for ; Wed, 14 Apr 2021 01:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB69F613C3 for ; Wed, 14 Apr 2021 01:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348964AbhDNBFf (ORCPT ); Tue, 13 Apr 2021 21:05:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:38050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348955AbhDNBFf (ORCPT ); Tue, 13 Apr 2021 21:05:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AC137613B6; Wed, 14 Apr 2021 01:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362314; bh=pggsuEBAxeFkt/2YrIL9S1p8Wbe8lTZ2siA+EEQgwA4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=JNusYFahHdZS65hV3xGjNOmazbw2W6cFkK7XiYrHSQZ+Mi1QYFhe6dFsVXSFvqPa5 sz/1zVaJql8qEKihRR0h6uTeE1qLP/9e7EEVZE+nbz6dyPvQD9VNIQOft6C5D4ACoK nYWTnUs8uc8gO20vx2H4O7vi/Cu61kDI+SLAFf7cD6+WJsUDQfs6kv2lcNwxSF65DV LpW2lfIBET23e60a9ctWq4gxD9bkmyiCoI2mJMrR00utiYQITJM9w3G03IGtFOIEbI kMTiLRGgjIOry0cXlQhkPv6GyZDuWO+b9P7MiYBY679REUfpS+fsus63AYSuArhQa1 vfkaUi9FlpKXA== Subject: [PATCH 7/9] generic/620: fix order of require_scratch calls From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:05:14 -0700 Message-ID: <161836231396.2754991.1877515727730919792.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong _require_scratch_16T_support does not itself check that the scratch device exists, which means that it depends on someone else to call _require_scratch. Document this dependency and fix this test so that we can run: ./check --exact-order generic/374 generic/620 on an ext4 filesystem without g/620 tripping over the mess left by g/374 when it calls _notrun. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/rc | 3 ++- tests/generic/620 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 23f86ce6..bb54df56 100644 --- a/common/rc +++ b/common/rc @@ -1608,7 +1608,8 @@ _require_scratch_size_nocheck() [ $devsize -lt $1 ] && _notrun "scratch dev too small" } -# require scratch fs which supports >16T of filesystem size. +# Require scratch fs which supports >16T of filesystem size. +# _require_scratch must be called before this function is called. _require_scratch_16T_support() { case $FSTYP in diff --git a/tests/generic/620 b/tests/generic/620 index d0e58ca4..60559441 100755 --- a/tests/generic/620 +++ b/tests/generic/620 @@ -41,8 +41,8 @@ rm -f $seqres.full # Modify as appropriate. _supported_fs generic -_require_scratch_16T_support _require_scratch_size_nocheck $((4 * 1024 * 1024)) #kB +_require_scratch_16T_support _require_dmhugedisk # 17TB dm huge-test-zer0 device From patchwork Wed Apr 14 01:05:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201667 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 0663FC43460 for ; Wed, 14 Apr 2021 01:05:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E22F5613CE for ; Wed, 14 Apr 2021 01:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348965AbhDNBFl (ORCPT ); Tue, 13 Apr 2021 21:05:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:38082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348955AbhDNBFl (ORCPT ); Tue, 13 Apr 2021 21:05:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BFF00613BD; Wed, 14 Apr 2021 01:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362320; bh=g5hpyrx0j8qmL9uXoi8Kt2ksDIykdu4GIn/sovXBWJ8=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=VB5RL7ug828ZNo/2DrzRzuFUOOuo7YGLPyH90QTCegVIrGp3VoUrEXApeDqsKqj4D RVTz4QU/f6yHMHsfKWe5iuNBNYSSDJsfwvJyrfgMHd6fm5M5k7LnYFcLL7XXtYgj5l ZBd6roGFJ6wdTkVZeU4T1ZLJ6YLH18tb5rRo1d9pDiq8t0GLdsPll7ncXcdDV8sjwH DCzUluOJYObIHhqazr7gSYi5FYw9xpQBwDhJ6ODdtN1yBBbPqp0D2OSiohdPZ+apo1 sESzkT+NiUgpKWT2a5NzmLS8Po3R/97nDHao0h+u/DTdv/7GnYbXrJV7pRAc4fqJSM VbAj0dc/wpDpA== Subject: [PATCH 8/9] generic/{094,225}: skip test when the xfs rt extent size is larger than 1 fsb From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:05:20 -0700 Message-ID: <161836232004.2754991.941115577343319256.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong These two tests call various fallocate modes on a file and compare the FIEMAP output to some golden output. Unfortunately, the golden output doesn't take into account the possibility that (on XFS) the files could be created on a realtime volume with a large rt extent size set. Under such a configuration, fpunch operations that are aligned to the fs block size but not the rt extent size simply result in those blocks being set to unwritten status. Unfortunately, the test expects holes and fails. Therefore, detect the situation and skip the tests. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/rc | 10 ++++++++++ tests/generic/094 | 5 +++++ tests/generic/225 | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/common/rc b/common/rc index bb54df56..b5e930de 100644 --- a/common/rc +++ b/common/rc @@ -4062,6 +4062,16 @@ _get_block_size() stat -f -c %S $1 } +# Require that the fundamental allocation unit of a file is the same as the +# filesystem block size. +_require_file_block_size_equals_fs_block_size() +{ + local file_alloc_unit="$(_get_file_block_size $1)" + local fs_block_size="$(_get_block_size $1)" + test "$file_alloc_unit" != "$fs_block_size" && \ + _notrun "File allocation unit is larger than a filesystem block" +} + get_page_size() { echo $(getconf PAGE_SIZE) diff --git a/tests/generic/094 b/tests/generic/094 index d371e951..8c292473 100755 --- a/tests/generic/094 +++ b/tests/generic/094 @@ -40,6 +40,11 @@ fiemapfile=$SCRATCH_MNT/$seq.fiemap _require_test_program "fiemap-tester" +# FIEMAP test doesn't like finding unwritten blocks after it punches out +# a partial rt extent. +test "$FSTYP" = "xfs" && \ + _require_file_block_size_equals_fs_block_size $fiemapfile + seed=`date +%s` echo "using seed $seed" >> $seqres.full diff --git a/tests/generic/225 b/tests/generic/225 index 1228a256..fac688df 100755 --- a/tests/generic/225 +++ b/tests/generic/225 @@ -40,6 +40,11 @@ fiemaplog=$SCRATCH_MNT/$seq.log _require_test_program "fiemap-tester" +# FIEMAP test doesn't like finding unwritten blocks after it punches out +# a partial rt extent. +test "$FSTYP" = "xfs" && \ + _require_file_block_size_equals_fs_block_size $fiemapfile + seed=`date +%s` echo "using seed $seed" >> $fiemaplog From patchwork Wed Apr 14 01:05:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12201669 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 D7D92C43460 for ; Wed, 14 Apr 2021 01:05:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB3CA613C0 for ; Wed, 14 Apr 2021 01:05:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348967AbhDNBFr (ORCPT ); Tue, 13 Apr 2021 21:05:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231892AbhDNBFr (ORCPT ); Tue, 13 Apr 2021 21:05:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B5CDE613B6; Wed, 14 Apr 2021 01:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618362326; bh=ciw9XawiOHA/nO5Uu28ulUUKiFo2Lyl5PEG2yeWAXww=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=SLwP6qk6J6gPX6hvDwihGeXYWKnkItH0q7nbZMEN6qCimHtK2gJcfiEYOau72wj9u lQIkXull1mn3BPbgQQoCYYKQ0peYHZngMLTjjdMN5kkOGcWvOm3HlmOhI7IhaKyv1o 9dceVIF0nI0PO7NMMWO8GFbTW/N+9AxlPHfqJBBRsMQff+8opH1NAdzmpeY/uFw1WN 21oBBibpi4d+CdodazHLsUQMF1CQUO0kTd6/BWxcfvzCODZN76/YtilnxFwD0+FWqK uhItEgksrCzLxNjR+NK8rZmVUlRR18p8IUn8u6fyV7+Qht1Sqp5XhUVc6EnajKKZN0 ASUxm5sHM71WQ== Subject: [PATCH 9/9] xfs/305: make sure that fsstress is still running when we quotaoff From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 13 Apr 2021 18:05:26 -0700 Message-ID: <161836232608.2754991.16417283237743979525.stgit@magnolia> In-Reply-To: <161836227000.2754991.9697150788054520169.stgit@magnolia> References: <161836227000.2754991.9697150788054520169.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Greatly increase the number of fs ops that fsstress is supposed to run in in this test so that we can ensure that it's still running when the quotaoff gets run. 1000 might have been sufficient in 2013, but it isn't now. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/xfs/305 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/305 b/tests/xfs/305 index fdb48a1d..9a3f0e03 100755 --- a/tests/xfs/305 +++ b/tests/xfs/305 @@ -50,7 +50,7 @@ _exercise() _qmount mkdir -p $QUOTA_DIR - $FSSTRESS_PROG -d $QUOTA_DIR -n 1000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 & + $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 & sleep 10 xfs_quota -x -c "off -$type" $SCRATCH_DEV sleep 5