diff options
author | Vyacheslav Dubeyko <Vyacheslav.Dubeyko@hgst.com> | 2014-08-08 14:20:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 15:57:21 -0700 |
commit | 02a0ba1c60c2ad532322089a60256c8b0f46678c (patch) | |
tree | 78495c866045875516e569378f222b1451037913 /fs/nilfs2/sysfs.h | |
parent | ef43d5cd84b7d2ea09846de34e14be7d74be3e6f (diff) |
nilfs2: add /sys/fs/nilfs2/<device>/checkpoints group
This patch adds creation of /sys/fs/nilfs2/<device>/checkpoints
group.
The checkpoints group contains attributes that describe
details about volume's checkpoints:
(1) checkpoints_number - show number of checkpoints on volume.
(2) snapshots_number - show number of snapshots on volume.
(3) last_seg_checkpoint - show checkpoint number of the latest segment.
(4) next_checkpoint - show next checkpoint number.
Signed-off-by: Vyacheslav Dubeyko <Vyacheslav.Dubeyko@hgst.com>
Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: Michael L. Semon <mlsemon35@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/sysfs.h')
-rw-r--r-- | fs/nilfs2/sysfs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/nilfs2/sysfs.h b/fs/nilfs2/sysfs.h index 228bdd14f945..62f0a0dc78ca 100644 --- a/fs/nilfs2/sysfs.h +++ b/fs/nilfs2/sysfs.h @@ -30,6 +30,8 @@ * @sg_superblock_kobj_unregister: completion state * @sg_segctor_kobj: /sys/fs/<nilfs>/<device>/segctor * @sg_segctor_kobj_unregister: completion state + * @sg_checkpoints_kobj: /sys/fs/<nilfs>/<device>/checkpoints + * @sg_checkpoints_kobj_unregister: completion state * @sg_segments_kobj: /sys/fs/<nilfs>/<device>/segments * @sg_segments_kobj_unregister: completion state */ @@ -42,6 +44,10 @@ struct nilfs_sysfs_dev_subgroups { struct kobject sg_segctor_kobj; struct completion sg_segctor_kobj_unregister; + /* /sys/fs/<nilfs>/<device>/checkpoints */ + struct kobject sg_checkpoints_kobj; + struct completion sg_checkpoints_kobj_unregister; + /* /sys/fs/<nilfs>/<device>/segments */ struct kobject sg_segments_kobj; struct completion sg_segments_kobj_unregister; @@ -69,6 +75,7 @@ struct nilfs_##name##_attr { \ NILFS_DEV_ATTR_STRUCT(dev); NILFS_DEV_ATTR_STRUCT(segments); +NILFS_DEV_ATTR_STRUCT(checkpoints); NILFS_DEV_ATTR_STRUCT(superblock); NILFS_DEV_ATTR_STRUCT(segctor); @@ -104,6 +111,11 @@ NILFS_DEV_ATTR_STRUCT(segctor); #define NILFS_SEGMENTS_RW_ATTR(name) \ NILFS_RW_ATTR(segs_info, name) +#define NILFS_CHECKPOINTS_RO_ATTR(name) \ + NILFS_RO_ATTR(checkpoints, name) +#define NILFS_CHECKPOINTS_RW_ATTR(name) \ + NILFS_RW_ATTR(checkpoints, name) + #define NILFS_SUPERBLOCK_RO_ATTR(name) \ NILFS_RO_ATTR(superblock, name) #define NILFS_SUPERBLOCK_RW_ATTR(name) \ @@ -122,6 +134,8 @@ NILFS_DEV_ATTR_STRUCT(segctor); (&nilfs_dev_attr_##name.attr) #define NILFS_SEGMENTS_ATTR_LIST(name) \ (&nilfs_segments_attr_##name.attr) +#define NILFS_CHECKPOINTS_ATTR_LIST(name) \ + (&nilfs_checkpoints_attr_##name.attr) #define NILFS_SUPERBLOCK_ATTR_LIST(name) \ (&nilfs_superblock_attr_##name.attr) #define NILFS_SEGCTOR_ATTR_LIST(name) \ |