From patchwork Wed Nov 1 21:47:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10037469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 29B54604D7 for ; Wed, 1 Nov 2017 21:47:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F13D28C04 for ; Wed, 1 Nov 2017 21:47:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 140FB28C05; Wed, 1 Nov 2017 21:47:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3ACE28C08 for ; Wed, 1 Nov 2017 21:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933892AbdKAVrm (ORCPT ); Wed, 1 Nov 2017 17:47:42 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:20113 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933631AbdKAVrk (ORCPT ); Wed, 1 Nov 2017 17:47:40 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA1Llc5q012249 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Nov 2017 21:47:38 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA1Llc3B008937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Nov 2017 21:47:38 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA1LlbSe030847; Wed, 1 Nov 2017 21:47:37 GMT Received: from localhost (/10.145.178.58) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 01 Nov 2017 14:47:37 -0700 Subject: [PATCH 11/14] xfs/010: filter and record the unknown block state messages From: "Darrick J. Wong" To: eguan@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Wed, 01 Nov 2017 14:47:36 -0700 Message-ID: <150957285613.18388.298600850675665534.stgit@magnolia> In-Reply-To: <150957278824.18388.17975162441125293654.stgit@magnolia> References: <150957278824.18388.17975162441125293654.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Record the unknown block state messages that xfs_repair produces when we nuke the finobt. Signed-off-by: Darrick J. Wong --- common/repair | 9 +++++++++ tests/xfs/010 | 2 +- tests/xfs/030 | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/common/repair b/common/repair index 2b1583b..b569541 100644 --- a/common/repair +++ b/common/repair @@ -95,9 +95,18 @@ s/(stripe unit) \(.*\) (and width) \(.*\)/\1 (SU) \2 (SW)/; s/(superblock) (\d+)/\1 AGNO/; s/(AG \#)(\d+)/\1AGNO/; s/(reset bad sb for ag) (\d+)/\1 AGNO/; +s/(unknown block state, ag )(\d+)(, block )(\d+)/\1AGNO\3AGBNO/; print;' } +# Filter out unknown block state messages that appear when rmap is enabled +# and we erase a btree root pointer (such that repair never finds the +# tree and fails to reconcile the metadata reverse mappings against the +# metadata). +_filter_repair_lostblocks() { + _filter_repair | sed -e '/unknown block state, ag AGNO, block AGBNO/d' +} + _filter_dd() { fgrep -v records # lose records in/out lines diff --git a/tests/xfs/010 b/tests/xfs/010 index b9f2891..17607d6 100755 --- a/tests/xfs/010 +++ b/tests/xfs/010 @@ -129,7 +129,7 @@ _check_scratch_fs # nuke the finobt root, repair will have to regenerate from the inobt _corrupt_finobt_root $SCRATCH_DEV -_scratch_xfs_repair 2>&1 | _filter_repair +_scratch_xfs_repair 2>&1 | _filter_repair_lostblocks status=0 exit diff --git a/tests/xfs/030 b/tests/xfs/030 index bc80775..fcea754 100755 --- a/tests/xfs/030 +++ b/tests/xfs/030 @@ -58,7 +58,7 @@ _check_ag() -e '/^bad agbno AGBNO for rmapbt/d' \ -e '/^bad agbno AGBNO for refcntbt/d' \ -e '/^Missing reverse-mapping record.*/d' \ - -e '/^unknown block state, ag 0, block.*/d' + -e '/^unknown block state, ag AGNO, block.*/d' done }