From patchwork Wed Mar 20 20:05:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10862559 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 3AEF513B5 for ; Wed, 20 Mar 2019 20:05:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C4E829B8F for ; Wed, 20 Mar 2019 20:05:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1018E29C49; Wed, 20 Mar 2019 20:05:17 +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 9736629B8F for ; Wed, 20 Mar 2019 20:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfCTUFQ (ORCPT ); Wed, 20 Mar 2019 16:05:16 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:57036 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfCTUFQ (ORCPT ); Wed, 20 Mar 2019 16:05:16 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2KK2IFO145438; Wed, 20 Mar 2019 20:05:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=7AvlhRtoEAKwdNHZoHq08aYi7e3ogLv2ncXf1IqLGGc=; b=L0DJxa/nGtQCvDyKRsKf6mbZBuv4a3UF1Q0eOghX1/LeeKkCu5OZPwwju8h4kxh6YzvT 0mh3cma/rO/y7SP4ew6tCjBjUyuq8uHvGqKWXSYai7YGNqAQx1gQVyII3YfhoQGA/wbE Fr0YCvEk/OQbVyfJpxwyDfiGYrfgHTWuuxn1cnH0P+kMdVy4AW74JRn4pFdQ8eoZ5dJA nP4hqjWv5YmdeYN+nr9K/LypMbvq1NcpU4Xnv87WzBK6Uv5OZTRPqucrJKQdqJxWzJBd N61tdJV+3SlvNmsoED9eycgRZ0+eoMAO1L5uBYoidXhJZZtuXxL9R1rqBgN7FsFBrZoQ Pg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2r8ssrmv2h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 20:05:13 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2KK5CnM030878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 20:05:13 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2KK5CGM027978; Wed, 20 Mar 2019 20:05:12 GMT Received: from localhost (/10.159.247.212) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 20 Mar 2019 13:05:12 -0700 Date: Wed, 20 Mar 2019 13:05:13 -0700 From: "Darrick J. Wong" To: sandeen@sandeen.net Cc: linux-xfs@vger.kernel.org Subject: [PATCH 47/36] xfs_scrub: remove xfs_ prefixes from structure names Message-ID: <20190320200513.GK1183@magnolia> References: <155259742281.31886.17157720770696604377.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <155259742281.31886.17157720770696604377.stgit@magnolia> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9201 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200145 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 Drop the xfs_ prefix from scrub's struct definitions since they're private to the program. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- scrub/phase5.c | 8 +++---- scrub/phase7.c | 66 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/scrub/phase5.c b/scrub/phase5.c index 49886e6f..1743119d 100644 --- a/scrub/phase5.c +++ b/scrub/phase5.c @@ -119,12 +119,12 @@ xfs_scrub_scan_dirents( #ifdef HAVE_LIBATTR /* Routines to scan all of an inode's xattrs for name problems. */ -struct xfs_attr_ns { +struct attrns_decode { int flags; const char *name; }; -static const struct xfs_attr_ns attr_ns[] = { +static const struct attrns_decode attr_ns[] = { {0, "user"}, {ATTR_ROOT, "system"}, {ATTR_SECURE, "secure"}, @@ -141,7 +141,7 @@ xfs_scrub_scan_fhandle_namespace_xattrs( const char *descr, struct xfs_handle *handle, struct xfs_bstat *bstat, - const struct xfs_attr_ns *attr_ns) + const struct attrns_decode *attr_ns) { struct attrlist_cursor cur; char attrbuf[XFS_XATTR_LIST_MAX]; @@ -202,7 +202,7 @@ xfs_scrub_scan_fhandle_xattrs( struct xfs_handle *handle, struct xfs_bstat *bstat) { - const struct xfs_attr_ns *ns; + const struct attrns_decode *ns; bool moveon = true; for (ns = attr_ns; ns->name; ns++) { diff --git a/scrub/phase7.c b/scrub/phase7.c index 504a6927..0c3202e4 100644 --- a/scrub/phase7.c +++ b/scrub/phase7.c @@ -16,7 +16,7 @@ /* Phase 7: Check summary counters. */ -struct xfs_summary_counts { +struct summary_counts { unsigned long long dbytes; /* data dev bytes */ unsigned long long rbytes; /* rt dev bytes */ unsigned long long next_phys; /* next phys bytes we see? */ @@ -26,13 +26,13 @@ struct xfs_summary_counts { /* Record block usage. */ static bool xfs_record_block_summary( - struct scrub_ctx *ctx, - const char *descr, - struct fsmap *fsmap, - void *arg) + struct scrub_ctx *ctx, + const char *descr, + struct fsmap *fsmap, + void *arg) { - struct xfs_summary_counts *counts; - unsigned long long len; + struct summary_counts *counts; + unsigned long long len; counts = ptvar_get((struct ptvar *)arg); if (fsmap->fmr_device == ctx->fsinfo.fs_logdev) @@ -67,12 +67,12 @@ xfs_record_block_summary( /* Add all the summaries in the per-thread counter */ static bool xfs_add_summaries( - struct ptvar *ptv, - void *data, - void *arg) + struct ptvar *ptv, + void *data, + void *arg) { - struct xfs_summary_counts *total = arg; - struct xfs_summary_counts *item = data; + struct summary_counts *total = arg; + struct summary_counts *item = data; total->dbytes += item->dbytes; total->rbytes += item->rbytes; @@ -88,27 +88,27 @@ xfs_add_summaries( */ bool xfs_scan_summary( - struct scrub_ctx *ctx) + struct scrub_ctx *ctx) { - struct xfs_summary_counts totalcount = {0}; - struct ptvar *ptvar; - unsigned long long used_data; - unsigned long long used_rt; - unsigned long long used_files; - unsigned long long stat_data; - unsigned long long stat_rt; - uint64_t counted_inodes = 0; - unsigned long long absdiff; - unsigned long long d_blocks; - unsigned long long d_bfree; - unsigned long long r_blocks; - unsigned long long r_bfree; - unsigned long long f_files; - unsigned long long f_free; - bool moveon; - bool complain; - int ip; - int error; + struct summary_counts totalcount = {0}; + struct ptvar *ptvar; + unsigned long long used_data; + unsigned long long used_rt; + unsigned long long used_files; + unsigned long long stat_data; + unsigned long long stat_rt; + uint64_t counted_inodes = 0; + unsigned long long absdiff; + unsigned long long d_blocks; + unsigned long long d_bfree; + unsigned long long r_blocks; + unsigned long long r_bfree; + unsigned long long f_files; + unsigned long long f_free; + bool moveon; + bool complain; + int ip; + int error; /* Flush everything out to disk before we start counting. */ error = syncfs(ctx->mnt_fd); @@ -117,7 +117,7 @@ xfs_scan_summary( return false; } - ptvar = ptvar_init(scrub_nproc(ctx), sizeof(struct xfs_summary_counts)); + ptvar = ptvar_init(scrub_nproc(ctx), sizeof(struct summary_counts)); if (!ptvar) { str_errno(ctx, ctx->mntpoint); return false;