]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_scrub: remove xfs_ prefixes from structure names
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 20:40:33 +0000 (15:40 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 26 Apr 2019 20:40:33 +0000 (15:40 -0500)
Drop the xfs_ prefix from scrub's struct definitions since they're
private to the program.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/phase5.c
scrub/phase7.c

index 49886e6feefd6ac3d20200307edacaeb7d8fbf4b..1743119d4fcfd5da36522fa6ceb088f48106501e 100644 (file)
@@ -119,12 +119,12 @@ out:
 
 #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++) {
index 504a69277a4cc59de7658b5d3cdaeed303b852cf..0c3202e464ac492b9d804c4e241ecb8598e32e42 100644 (file)
@@ -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;