From patchwork Tue Nov 6 04:08:53 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: 10669587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FD8214E2 for ; Tue, 6 Nov 2018 04:08:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D04C2A069 for ; Tue, 6 Nov 2018 04:08:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7163C2A06E; Tue, 6 Nov 2018 04:08:58 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 20C092A069 for ; Tue, 6 Nov 2018 04:08:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729628AbeKFNcJ (ORCPT ); Tue, 6 Nov 2018 08:32:09 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:39692 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728961AbeKFNcJ (ORCPT ); Tue, 6 Nov 2018 08:32:09 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA6406RB173834 for ; Tue, 6 Nov 2018 04:08:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=s9I88Jr4q7az/tynorqXh20W+YuU6eSWYc0ZvydJJVc=; b=wPOQ60uHJ/ItBAEmXf7M6AD9AHfbgX2YWyQWIlpI20tuQYGbxavb/l+9FjE/0QO0BhW2 35uLOkFfo3osaStUKd5JA8MtHuB1MTa8WkwUUh5c1ncbRcfABKZPuHsdSiyC/N5SfzPD ieqYhMN812qPySFsAZ54GPLGNOXLVL9vQN7379mz2TrFL6EVh8TI/W1W8kpc6OF5iLEO UX7zavWvobiUJvLo+T/wZIR/KYKxxh9vblwd5yPVBFO/dPcwQlNuXmmPmduK/OLeyOLt RkO3i/z9Tug1YL4aavvU0GRLhC6y9BUAzkZ3r4LXvt6u6QZK2Vw4uD0fEKaR3O4ahcpx Mw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2nh4aqjpxt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 06 Nov 2018 04:08:56 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wA648sAv014113 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 6 Nov 2018 04:08:55 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wA648s4q011004 for ; Tue, 6 Nov 2018 04:08:54 GMT Received: from localhost (/10.159.235.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Nov 2018 20:08:54 -0800 Subject: [PATCH 7/8] xfs: rename xchk_iallocbt_check_freemask From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Mon, 05 Nov 2018 20:08:53 -0800 Message-ID: <154147733302.32496.14353755611959314260.stgit@magnolia> In-Reply-To: <154147728649.32496.4515247239602322709.stgit@magnolia> References: <154147728649.32496.4515247239602322709.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9068 signatures=668683 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-1807170000 definitions=main-1811060032 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 Change the name of xchk_iallocbt_check_freemask so that it represents what the function actually does. Signed-off-by: Darrick J. Wong --- fs/xfs/scrub/ialloc.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c index 645b248faa80..10c3aaefc2a3 100644 --- a/fs/xfs/scrub/ialloc.c +++ b/fs/xfs/scrub/ialloc.c @@ -305,9 +305,13 @@ xchk_iallocbt_check_cluster( return error; } -/* Make sure the free mask is consistent with what the inodes think. */ +/* + * For all the inode clusters that could map to this inobt record, make sure + * that the holemask makes sense and that the allocation status of each inode + * matches the freemask. + */ STATIC int -xchk_iallocbt_check_freemask( +xchk_iallocbt_check_clusters( struct xchk_btree *bs, struct xchk_iallocbt *iabt, struct xfs_inobt_rec_incore *irec) @@ -315,6 +319,13 @@ xchk_iallocbt_check_freemask( unsigned int chunk_ioff; int error = 0; + /* + * For the common case where this inobt record maps to multiple inode + * clusters this will call _check_cluster for each cluster. + * + * For the case that multiple inobt records map to a single cluster, + * this will call _check_cluster once. + */ for (chunk_ioff = 0; chunk_ioff < XFS_INODES_PER_CHUNK; chunk_ioff += iabt->inodes_per_cluster) { @@ -461,7 +472,7 @@ xchk_iallocbt_rec( xchk_btree_set_corrupt(bs->sc, bs->cur, 0); check_freemask: - error = xchk_iallocbt_check_freemask(bs, iabt, &irec); + error = xchk_iallocbt_check_clusters(bs, iabt, &irec); if (error) goto out;