#include <linux/kobject.h>
#include "nilfs.h"
#include "mdt.h"
#include "sufile.h"
#include "cpfile.h"
#include "sysfs.h"
static struct kset *nilfs_kset;
#define NILFS_DEV_INT_GROUP_OPS(name, parent_name) …
#define NILFS_DEV_INT_GROUP_TYPE(name, parent_name) …
#define NILFS_DEV_INT_GROUP_FNS(name, parent_name) …
static ssize_t
nilfs_snapshot_inodes_count_show(struct nilfs_snapshot_attr *attr,
struct nilfs_root *root, char *buf)
{ … }
static ssize_t
nilfs_snapshot_blocks_count_show(struct nilfs_snapshot_attr *attr,
struct nilfs_root *root, char *buf)
{ … }
static const char snapshot_readme_str[] = …;
static ssize_t
nilfs_snapshot_README_show(struct nilfs_snapshot_attr *attr,
struct nilfs_root *root, char *buf)
{ … }
NILFS_SNAPSHOT_RO_ATTR(…);
NILFS_SNAPSHOT_RO_ATTR(…);
NILFS_SNAPSHOT_RO_ATTR(…);
static struct attribute *nilfs_snapshot_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static ssize_t nilfs_snapshot_attr_show(struct kobject *kobj,
struct attribute *attr, char *buf)
{ … }
static ssize_t nilfs_snapshot_attr_store(struct kobject *kobj,
struct attribute *attr,
const char *buf, size_t len)
{ … }
static void nilfs_snapshot_attr_release(struct kobject *kobj)
{ … }
static const struct sysfs_ops nilfs_snapshot_attr_ops = …;
static const struct kobj_type nilfs_snapshot_ktype = …;
int nilfs_sysfs_create_snapshot_group(struct nilfs_root *root)
{ … }
void nilfs_sysfs_delete_snapshot_group(struct nilfs_root *root)
{ … }
static const char mounted_snapshots_readme_str[] = …;
static ssize_t
nilfs_mounted_snapshots_README_show(struct nilfs_mounted_snapshots_attr *attr,
struct the_nilfs *nilfs, char *buf)
{ … }
NILFS_MOUNTED_SNAPSHOTS_RO_ATTR(…);
static struct attribute *nilfs_mounted_snapshots_attrs[] = …;
ATTRIBUTE_GROUPS(…);
NILFS_DEV_INT_GROUP_OPS(…);
NILFS_DEV_INT_GROUP_TYPE(…);
NILFS_DEV_INT_GROUP_FNS(mounted_snapshots, dev);
static ssize_t
nilfs_checkpoints_checkpoints_number_show(struct nilfs_checkpoints_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_checkpoints_snapshots_number_show(struct nilfs_checkpoints_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_checkpoints_last_seg_checkpoint_show(struct nilfs_checkpoints_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_checkpoints_next_checkpoint_show(struct nilfs_checkpoints_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static const char checkpoints_readme_str[] = …;
static ssize_t
nilfs_checkpoints_README_show(struct nilfs_checkpoints_attr *attr,
struct the_nilfs *nilfs, char *buf)
{ … }
NILFS_CHECKPOINTS_RO_ATTR(…);
NILFS_CHECKPOINTS_RO_ATTR(…);
NILFS_CHECKPOINTS_RO_ATTR(…);
NILFS_CHECKPOINTS_RO_ATTR(…);
NILFS_CHECKPOINTS_RO_ATTR(…);
static struct attribute *nilfs_checkpoints_attrs[] = …;
ATTRIBUTE_GROUPS(…);
NILFS_DEV_INT_GROUP_OPS(…);
NILFS_DEV_INT_GROUP_TYPE(…);
NILFS_DEV_INT_GROUP_FNS(checkpoints, dev);
static ssize_t
nilfs_segments_segments_number_show(struct nilfs_segments_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segments_blocks_per_segment_show(struct nilfs_segments_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segments_clean_segments_show(struct nilfs_segments_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segments_dirty_segments_show(struct nilfs_segments_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static const char segments_readme_str[] = …;
static ssize_t
nilfs_segments_README_show(struct nilfs_segments_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
NILFS_SEGMENTS_RO_ATTR(…);
NILFS_SEGMENTS_RO_ATTR(…);
NILFS_SEGMENTS_RO_ATTR(…);
NILFS_SEGMENTS_RO_ATTR(…);
NILFS_SEGMENTS_RO_ATTR(…);
static struct attribute *nilfs_segments_attrs[] = …;
ATTRIBUTE_GROUPS(…);
NILFS_DEV_INT_GROUP_OPS(…);
NILFS_DEV_INT_GROUP_TYPE(…);
NILFS_DEV_INT_GROUP_FNS(segments, dev);
static ssize_t
nilfs_segctor_last_pseg_block_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_last_seg_sequence_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_last_seg_checkpoint_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_current_seg_sequence_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_current_last_full_seg_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_next_full_seg_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_next_pseg_offset_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_next_checkpoint_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_last_seg_write_time_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_last_seg_write_time_secs_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_last_nongc_write_time_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_last_nongc_write_time_secs_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_segctor_dirty_data_blocks_count_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static const char segctor_readme_str[] = …;
static ssize_t
nilfs_segctor_README_show(struct nilfs_segctor_attr *attr,
struct the_nilfs *nilfs, char *buf)
{ … }
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
NILFS_SEGCTOR_RO_ATTR(…);
static struct attribute *nilfs_segctor_attrs[] = …;
ATTRIBUTE_GROUPS(…);
NILFS_DEV_INT_GROUP_OPS(…);
NILFS_DEV_INT_GROUP_TYPE(…);
NILFS_DEV_INT_GROUP_FNS(segctor, dev);
static ssize_t
nilfs_superblock_sb_write_time_show(struct nilfs_superblock_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_superblock_sb_write_time_secs_show(struct nilfs_superblock_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_superblock_sb_write_count_show(struct nilfs_superblock_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_superblock_sb_update_frequency_show(struct nilfs_superblock_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static ssize_t
nilfs_superblock_sb_update_frequency_store(struct nilfs_superblock_attr *attr,
struct the_nilfs *nilfs,
const char *buf, size_t count)
{ … }
static const char sb_readme_str[] = …;
static ssize_t
nilfs_superblock_README_show(struct nilfs_superblock_attr *attr,
struct the_nilfs *nilfs, char *buf)
{ … }
NILFS_SUPERBLOCK_RO_ATTR(…);
NILFS_SUPERBLOCK_RO_ATTR(…);
NILFS_SUPERBLOCK_RO_ATTR(…);
NILFS_SUPERBLOCK_RW_ATTR(…);
NILFS_SUPERBLOCK_RO_ATTR(…);
static struct attribute *nilfs_superblock_attrs[] = …;
ATTRIBUTE_GROUPS(…);
NILFS_DEV_INT_GROUP_OPS(…);
NILFS_DEV_INT_GROUP_TYPE(…);
NILFS_DEV_INT_GROUP_FNS(superblock, dev);
static
ssize_t nilfs_dev_revision_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static
ssize_t nilfs_dev_blocksize_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static
ssize_t nilfs_dev_device_size_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static
ssize_t nilfs_dev_free_blocks_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static
ssize_t nilfs_dev_uuid_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static
ssize_t nilfs_dev_volume_name_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
static const char dev_readme_str[] = …;
static ssize_t nilfs_dev_README_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{ … }
NILFS_DEV_RO_ATTR(…);
NILFS_DEV_RO_ATTR(…);
NILFS_DEV_RO_ATTR(…);
NILFS_DEV_RO_ATTR(…);
NILFS_DEV_RO_ATTR(…);
NILFS_DEV_RO_ATTR(…);
NILFS_DEV_RO_ATTR(…);
static struct attribute *nilfs_dev_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static ssize_t nilfs_dev_attr_show(struct kobject *kobj,
struct attribute *attr, char *buf)
{ … }
static ssize_t nilfs_dev_attr_store(struct kobject *kobj,
struct attribute *attr,
const char *buf, size_t len)
{ … }
static void nilfs_dev_attr_release(struct kobject *kobj)
{ … }
static const struct sysfs_ops nilfs_dev_attr_ops = …;
static const struct kobj_type nilfs_dev_ktype = …;
int nilfs_sysfs_create_device_group(struct super_block *sb)
{ … }
void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)
{ … }
static ssize_t nilfs_feature_revision_show(struct kobject *kobj,
struct attribute *attr, char *buf)
{ … }
static const char features_readme_str[] = …;
static ssize_t nilfs_feature_README_show(struct kobject *kobj,
struct attribute *attr,
char *buf)
{ … }
NILFS_FEATURE_RO_ATTR(…);
NILFS_FEATURE_RO_ATTR(…);
static struct attribute *nilfs_feature_attrs[] = …;
static const struct attribute_group nilfs_feature_attr_group = …;
int __init nilfs_sysfs_init(void)
{ … }
void nilfs_sysfs_exit(void)
{ … }