From patchwork Thu Mar 22 06:19:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10300895 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 43928600CC for ; Thu, 22 Mar 2018 06:19:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DC1929A12 for ; Thu, 22 Mar 2018 06:19:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E8FD29A16; Thu, 22 Mar 2018 06:19:22 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 96A7C29A12 for ; Thu, 22 Mar 2018 06:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752163AbeCVGTU (ORCPT ); Thu, 22 Mar 2018 02:19:20 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:50016 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbeCVGTT (ORCPT ); Thu, 22 Mar 2018 02:19:19 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2M6Cwko140405 for ; Thu, 22 Mar 2018 06:19:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=/U31Sr3pc9OUFAESNwEN4HQ3AhwBdOT337ERPXPucFk=; b=l0dr2OYZnpsDTPSa99y1u2r1+ft6RQswtSNw7UjT2Qjm2JNlyH3LGVWPWz36OoL1CeWD 24VHBbnNBKt3+YOdGf70sbt5t+SkqcZ6pKpfAlwHaASmlrjqEu7fuQzM425w6U0RhVQo FP+kSrBJCtfb64d0xjKCzwNEKaOiHqFUB9nwRCXsV3PzL/lYXONOiFOVgYim1CLfSRtp OMrOyPkfWPXOIy/BayChzI0gkzXrazBhzdkl1CYwOFkT2En706HLO1+Eiq63Rfn5WbsY UoAOyCu8ewBxpy6P2Eo9u3FK/ehcLE3yUzUs0RO3hpzxz0EXof3AngDvwHH4CsmYge0n Tw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2gv71100s4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Mar 2018 06:19:19 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2M6JHc4015069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Mar 2018 06:19:18 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2M6JHoE011240 for ; Thu, 22 Mar 2018 06:19:17 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 21 Mar 2018 23:19:17 -0700 Date: Wed, 21 Mar 2018 23:19:16 -0700 From: "Darrick J. Wong" To: linux-xfs@vger.kernel.org Subject: [PATCH 12/9] xfs: xfs_scrub_iallocbt_xref_rmap_inodes should use xref_set_corrupt Message-ID: <20180322061916.GT4818@magnolia> References: <152107377037.19571.8618901963505842632.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <152107377037.19571.8618901963505842632.stgit@magnolia> User-Agent: Mutt/1.5.24 (2015-08-30) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8839 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803200127 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 In xfs_scrub_iallocbt_xref_rmap_inodes we're checking inodes against rmap records, so we should use xfs_scrub_btree_xref_set_corrupt if we encounter discrepancies here so that we know that it's a cross referencing error, not necessarily a corruption in the inobt itself. The userspace xfs_scrub program will try to repair outright corruptions in the agi/inobt prior to phase 3 so that the inode scan will proceed. If only a cross-referencing error is noted, the repair program defers the repair attempt until it can check the other space metadata at least once. It is therefore essential that the inobt scrubber can correctly distinguish between corruptions and "unable to cross-reference something else with this inobt". The same reasoning applies to "xfs: record inode buf errors as a xref error in inobt scrubber". Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster --- fs/xfs/scrub/ialloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c index 32e0d1a..106ca4b 100644 --- a/fs/xfs/scrub/ialloc.c +++ b/fs/xfs/scrub/ialloc.c @@ -434,7 +434,7 @@ xfs_scrub_iallocbt_xref_rmap_inodes( if (!xfs_scrub_should_check_xref(sc, &error, &sc->sa.rmap_cur)) return; if (blocks != inode_blocks) - xfs_scrub_btree_set_corrupt(sc, sc->sa.ino_cur, 0); + xfs_scrub_btree_xref_set_corrupt(sc, sc->sa.rmap_cur, 0); } /* Scrub the inode btrees for some AG. */