From patchwork Wed Aug 3 04:21:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12935165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77248C3F6B0 for ; Wed, 3 Aug 2022 04:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233724AbiHCEV3 (ORCPT ); Wed, 3 Aug 2022 00:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbiHCEV2 (ORCPT ); Wed, 3 Aug 2022 00:21:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CA743FA29; Tue, 2 Aug 2022 21:21:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1955D612BE; Wed, 3 Aug 2022 04:21:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B748C433B5; Wed, 3 Aug 2022 04:21:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659500486; bh=ZMRRftXBZYRdKNYNL9eP7mpuXRuvArnl5y1ivd03ZP4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Oxabw6WyT61sm81bdLQ8ydlca3GUlJ8s64DChAink44vpQ+FsLWnjUOCx7NCBt53n 0LDki7bg7SUw+w5tw6wOFyuSYQr5uvgqp0powWaDE9OV9TBIaFyP6Zbm9LAEtaeRpJ WkW1yuaH2R1c4jro8BwlbhERuFhZlvr0+SrSAPJLbzONBAjbumilNZlrTUUA9sVAuL zJFq1Z19dH1+66+uM4Acf4taM3RQZ2cgZqgGhWe1RIQ6GP9Gj/c8zANRBqNloO/3oW z5GFT7C2h4ZwOBnXGKPs+dC7A0fRXXmdcuxjunkl3VEXrbFbcXV0lhVgl3N+qJrFvT JbfbMSVewsmTA== Subject: [PATCH 1/3] xfs/432: fix this test when external devices are in use From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com, zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 02 Aug 2022 21:21:26 -0700 Message-ID: <165950048600.198815.10416873619760657341.stgit@magnolia> In-Reply-To: <165950048029.198815.11843926234080013062.stgit@magnolia> References: <165950048029.198815.11843926234080013062.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 This program exercises metadump and mdrestore being run against the scratch device. Therefore, the test must pass external log / rt device arguments to xfs_repair -n to check the "restored" filesystem. Fix the incorrect usage, and report repair failures, since this test has been silently failing for a while now. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang --- tests/xfs/432 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/xfs/432 b/tests/xfs/432 index 86012f0b..e1e610d0 100755 --- a/tests/xfs/432 +++ b/tests/xfs/432 @@ -89,7 +89,8 @@ _scratch_xfs_metadump $metadump_file -w xfs_mdrestore $metadump_file $metadump_img echo "Check restored metadump image" -$XFS_REPAIR_PROG -n $metadump_img >> $seqres.full 2>&1 +SCRATCH_DEV=$metadump_img _scratch_xfs_repair -n &>> $seqres.full || \ + echo "xfs_repair on restored fs returned $?" # success, all done status=0 From patchwork Wed Aug 3 04:21:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12935166 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3909C3F6B0 for ; Wed, 3 Aug 2022 04:21:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbiHCEVf (ORCPT ); Wed, 3 Aug 2022 00:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233759AbiHCEVe (ORCPT ); Wed, 3 Aug 2022 00:21:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DD5747BBA; Tue, 2 Aug 2022 21:21:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AEADA612F1; Wed, 3 Aug 2022 04:21:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 197DCC433D6; Wed, 3 Aug 2022 04:21:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659500492; bh=4SM+xsPZ1++hpEVq3WRJzUiT4xpxCOrjhvSn7fUSoas=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=eR+mmG4MtA0Z7KrjppeyeeH/UtyfKVeLEr28VuFsS211rw/k+es42m2YJeFe2i3K3 KVSxj88WR/wkGN2UcadN05Ri9cFLE8bT+ibFstrh5malMeLUGewsyD/o81rh4pJqN0 8APm/7qPFhRF+aoIiOk+FPi5A/WxTG/06GChxDpbjKoEsmMOBthA5g9kSIPqzkVmpF MUIb5RGK3SzI5NRfWWBPMTDbNrR4Kp2UnvYoRQ2ZwX7v1bz1w6D7UITO9nZuYJg1YN rhdSmUXLT58PxH3moKgliuwsUqD4MRnAVeqFK98RK8vulpGs8Cwe+GdLHBcnelzuNC OhYqZn0DmGu/g== Subject: [PATCH 2/3] xfs/291: convert open-coded _scratch_xfs_repair usage From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com, zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 02 Aug 2022 21:21:31 -0700 Message-ID: <165950049164.198815.17444582280704119144.stgit@magnolia> In-Reply-To: <165950048029.198815.11843926234080013062.stgit@magnolia> References: <165950048029.198815.11843926234080013062.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 Convert this test to use _scratch_xfs_repair, since the only variance from the standard usage is that it's called against a sparse file into which the scratch filesystem has been metadumped and mdrestored. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang --- tests/xfs/291 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/xfs/291 b/tests/xfs/291 index 6d5e247e..a2425e47 100755 --- a/tests/xfs/291 +++ b/tests/xfs/291 @@ -93,11 +93,7 @@ _scratch_xfs_check >> $seqres.full 2>&1 || _fail "xfs_check failed" # Can xfs_metadump cope with this monster? _scratch_xfs_metadump $tmp.metadump || _fail "xfs_metadump failed" xfs_mdrestore $tmp.metadump $tmp.img || _fail "xfs_mdrestore failed" -[ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \ - rt_repair_opts="-r $SCRATCH_RTDEV" -[ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_LOGDEV" ] && \ - log_repair_opts="-l $SCRATCH_LOGDEV" -$XFS_REPAIR_PROG $rt_repair_opts $log_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \ +SCRATCH_DEV=$tmp.img _scratch_xfs_repair -f &>> $seqres.full || \ _fail "xfs_repair of metadump failed" # Yes it can; success, all done From patchwork Wed Aug 3 04:21:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12935167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66E88C3F6B0 for ; Wed, 3 Aug 2022 04:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233845AbiHCEVk (ORCPT ); Wed, 3 Aug 2022 00:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233759AbiHCEVj (ORCPT ); Wed, 3 Aug 2022 00:21:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C46A754658; Tue, 2 Aug 2022 21:21:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5A2AE612BF; Wed, 3 Aug 2022 04:21:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADC9BC433D6; Wed, 3 Aug 2022 04:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659500497; bh=f7C6JziZ45Fs5wdruwI+E86ZzjuLGQpZfR5RpkB4qRg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=CKUncda+c9tD/dhNdl/kCrGtOlk3RY/1F7ZQ0MJm5wkDZHsZAMKHL6WN5F+QZ44TQ 7ey29/Bz5+O+IMkqoi0ih84MlH3zW06acSw27uaCWC8L7gbDciNchJpEFVH39W+g48 ZjBWT5VaEtjNPFxmK+0YortvSBdNTGsnooj3Er/3D5wqe9R+ooVMPVjhRvwydOfo4s e9VX92EEeofDBwzMjgJByadSjsFBnHaZPmIaUFYNC6pma4JZWxKO+4kK0WB0BZKDSV cLa7UTxPY3zxTPmzaLAAF3hUha7Rl0ZN9apek9e6/urbSgRkBGpPHClkBJqZxI6bwO Uc+A9MgV8mimg== Subject: [PATCH 3/3] xfs/533: fix golden output for this test From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com, zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Date: Tue, 02 Aug 2022 21:21:37 -0700 Message-ID: <165950049724.198815.5496412458825635633.stgit@magnolia> In-Reply-To: <165950048029.198815.11843926234080013062.stgit@magnolia> References: <165950048029.198815.11843926234080013062.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 Not sure what's up with this new test, but the golden output isn't right for upstream xfsprogs for-next. Change it to pass there... Signed-off-by: Darrick J. Wong --- tests/xfs/533.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/533.out b/tests/xfs/533.out index 7deb78a3..439fb16e 100644 --- a/tests/xfs/533.out +++ b/tests/xfs/533.out @@ -1,5 +1,5 @@ QA output created by 533 Allowing write of corrupted data with good CRC magicnum = 0 -bad magic number +Superblock has bad magic number 0x0. Not an XFS filesystem? 0