#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_sysfs.h"
#include "xfs_btree.h"
#include "xfs_super.h"
#include "scrub/scrub.h"
#include "scrub/stats.h"
#include "scrub/trace.h"
struct xchk_scrub_stats { … };
struct xchk_stats { … };
static struct xchk_stats global_stats;
static const char *name_map[XFS_SCRUB_TYPE_NR] = …;
STATIC ssize_t
xchk_stats_format(
struct xchk_stats *cs,
char *buf,
size_t remaining)
{ … }
STATIC size_t
xchk_stats_estimate_bufsize(
struct xchk_stats *cs)
{ … }
STATIC void
xchk_stats_clearall(
struct xchk_stats *cs)
{ … }
#define XFS_SCRUB_OFLAG_UNCLEAN …
STATIC void
xchk_stats_merge_one(
struct xchk_stats *cs,
const struct xfs_scrub_metadata *sm,
const struct xchk_stats_run *run)
{ … }
void
xchk_stats_merge(
struct xfs_mount *mp,
const struct xfs_scrub_metadata *sm,
const struct xchk_stats_run *run)
{ … }
static ssize_t
xchk_scrub_stats_read(
struct file *file,
char __user *ubuf,
size_t count,
loff_t *ppos)
{ … }
static const struct file_operations scrub_stats_fops = …;
static ssize_t
xchk_clear_scrub_stats_write(
struct file *file,
const char __user *ubuf,
size_t count,
loff_t *ppos)
{ … }
static const struct file_operations clear_scrub_stats_fops = …;
STATIC int
xchk_stats_init(
struct xchk_stats *cs,
struct xfs_mount *mp)
{ … }
void
xchk_stats_register(
struct xchk_stats *cs,
struct dentry *parent)
{ … }
STATIC int
xchk_stats_teardown(
struct xchk_stats *cs)
{ … }
void
xchk_stats_unregister(
struct xchk_stats *cs)
{ … }
int __init
xchk_global_stats_setup(
struct dentry *parent)
{ … }
void
xchk_global_stats_teardown(void)
{ … }
int
xchk_mount_stats_alloc(
struct xfs_mount *mp)
{ … }
void
xchk_mount_stats_free(
struct xfs_mount *mp)
{ … }