#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"},
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];
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++) {
/* 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? */
/* 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)
/* 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;
*/
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);
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;