#include "xfs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_sysfs.h"
#include "xfs_log.h"
#include "xfs_log_priv.h"
#include "xfs_mount.h"
struct xfs_sysfs_attr { … };
static inline struct xfs_sysfs_attr *
to_attr(struct attribute *attr)
{ … }
#define XFS_SYSFS_ATTR_RW(name) …
#define XFS_SYSFS_ATTR_RO(name) …
#define XFS_SYSFS_ATTR_WO(name) …
#define ATTR_LIST(name) …
STATIC ssize_t
xfs_sysfs_object_show(
struct kobject *kobject,
struct attribute *attr,
char *buf)
{ … }
STATIC ssize_t
xfs_sysfs_object_store(
struct kobject *kobject,
struct attribute *attr,
const char *buf,
size_t count)
{ … }
static const struct sysfs_ops xfs_sysfs_ops = …;
static struct attribute *xfs_mp_attrs[] = …;
ATTRIBUTE_GROUPS(…);
const struct kobj_type xfs_mp_ktype = …;
#ifdef DEBUG
STATIC ssize_t
bug_on_assert_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
STATIC ssize_t
bug_on_assert_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
STATIC ssize_t
log_recovery_delay_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
STATIC ssize_t
log_recovery_delay_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
STATIC ssize_t
mount_delay_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
STATIC ssize_t
mount_delay_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
static ssize_t
always_cow_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
static ssize_t
always_cow_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
STATIC ssize_t
pwork_threads_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
STATIC ssize_t
pwork_threads_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
static ssize_t
larp_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
STATIC ssize_t
larp_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
STATIC ssize_t
bload_leaf_slack_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
STATIC ssize_t
bload_leaf_slack_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
STATIC ssize_t
bload_node_slack_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
STATIC ssize_t
bload_node_slack_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RW(…);
static struct attribute *xfs_dbg_attrs[] = …;
ATTRIBUTE_GROUPS(…);
const struct kobj_type xfs_dbg_ktype = …;
#endif
static inline struct xstats *
to_xstats(struct kobject *kobject)
{ … }
STATIC ssize_t
stats_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RO(…);
STATIC ssize_t
stats_clear_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
XFS_SYSFS_ATTR_WO(…);
static struct attribute *xfs_stats_attrs[] = …;
ATTRIBUTE_GROUPS(…);
const struct kobj_type xfs_stats_ktype = …;
static inline struct xlog *
to_xlog(struct kobject *kobject)
{ … }
STATIC ssize_t
log_head_lsn_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RO(…);
STATIC ssize_t
log_tail_lsn_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RO(…);
STATIC ssize_t
reserve_grant_head_bytes_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RO(…);
STATIC ssize_t
write_grant_head_bytes_show(
struct kobject *kobject,
char *buf)
{ … }
XFS_SYSFS_ATTR_RO(…);
static struct attribute *xfs_log_attrs[] = …;
ATTRIBUTE_GROUPS(…);
const struct kobj_type xfs_log_ktype = …;
static inline struct xfs_error_cfg *
to_error_cfg(struct kobject *kobject)
{ … }
static inline struct xfs_mount *
err_to_mp(struct kobject *kobject)
{ … }
static ssize_t
max_retries_show(
struct kobject *kobject,
char *buf)
{ … }
static ssize_t
max_retries_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
XFS_SYSFS_ATTR_RW(…);
static ssize_t
retry_timeout_seconds_show(
struct kobject *kobject,
char *buf)
{ … }
static ssize_t
retry_timeout_seconds_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
XFS_SYSFS_ATTR_RW(…);
static ssize_t
fail_at_unmount_show(
struct kobject *kobject,
char *buf)
{ … }
static ssize_t
fail_at_unmount_store(
struct kobject *kobject,
const char *buf,
size_t count)
{ … }
XFS_SYSFS_ATTR_RW(…);
static struct attribute *xfs_error_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct kobj_type xfs_error_cfg_ktype = …;
static const struct kobj_type xfs_error_ktype = …;
struct xfs_error_init { … };
static const struct xfs_error_init xfs_error_meta_init[XFS_ERR_ERRNO_MAX] = …;
static int
xfs_error_sysfs_init_class(
struct xfs_mount *mp,
int class,
const char *parent_name,
struct xfs_kobj *parent_kobj,
const struct xfs_error_init init[])
{ … }
int
xfs_error_sysfs_init(
struct xfs_mount *mp)
{ … }
void
xfs_error_sysfs_del(
struct xfs_mount *mp)
{ … }
struct xfs_error_cfg *
xfs_error_get_cfg(
struct xfs_mount *mp,
int error_class,
int error)
{ … }