[PATCH v3 0/9] nilfs2: introduce functionality of creation of sysfs groups and attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This third version of patchset implements creation of
sysfs groups and attributes with the purpose to show
NILFS2 volume details, internal state of the driver and
to manage internal state of NILFS2 driver.

v2->v3
 * Add sysfs file for every format of timestamp output (Ryusuke Konishi)
 * Exclude global switching of the time format (Ryusuke Konishi)
 * Rename sysfs group from /sys/fs/nilfs into /sys/fs/nilfs2 (Ryusuke Konishi)
 * Add description of sysfs interface in sysfs-fs-nilfs2 (Ryusuke Konishi)

v1->v2
 * Improve human-readable format of timestamp output (Michael L. Semon)
 * Fix issue with nilfs_sysfs_{create/delete}_snapshot_group (Michael L. Semon)

Sysfs is a virtual file system that exports information about devices
and drivers from the kernel device model to user space, and is also used
for configuration. NILFS2 is a complex file system that has segctor thread,
GC thread, checkpoint/snapshot model and so on. Sysfs namespace provides
native and easy way for: (1) getting info and statistics about volume state;
(2) getting info and configuration of internal subsystems (segctor thread);
(3) snapshots management.

Suggested patchset provides basis for managing segctor thread behaviour and
manipulation by snapshots. Currently, it informs only about segctor thread's
internal parameters and about mounted snapshots. But sysfs interface can
provide easy and simple way for deep management of segctor thread and
snapshots.

This patchset provides opportunity to manage interval of periodical update
of superblock (in seconds). Default value is 10 seconds. Now a user can
increase this value by means of nilfs2/<device>/superblock/sb_update_frequency
attribute in the case of necessity.

Also the patchset provides opportunity to get information easily about key
volumes's parameters (free blocks, superblock write count, superblock update
frequency, latest segment info, dirty data blocks count, count of clean
segments, count of dirty segments and so on) in real time manner. Such
information can be used in scripts for subtle management of filesystem.

Implemented functionality creates such groups:
(1) /sys/fs/nilfs2 - root group
(2) /sys/fs/nilfs2/features - group contains attributes that describe NILFS
file system driver features
(3) /sys/fs/nilfs2/<device> - group contains attributes that describe file
system partition's details
(4) /sys/fs/nilfs2/<device>/superblock - group contains attributes that describe
superblock's details
(5) /sys/fs/nilfs2/<device>/segctor - group contains attributes that describe
segctor thread activity details
(6) /sys/fs/nilfs2/<device>/segments - group contains attributes that describe
details about volume's segments
(7) /sys/fs/nilfs2/<device>/checkpoints - group contains attributes that describe
details about volume's checkpoints
(8) /sys/fs/nilfs2/<device>/mounted_snapshots - group contains group for every
mounted snapshot
(9) /sys/fs/nilfs2/<device>/mounted_snapshots/<snapshot> - group contains
details about mounted snapshot

With the best regards,
Vyacheslav Dubeyko.
---
 Documentation/ABI/testing/sysfs-fs-nilfs2 |  311 ++++++++
 fs/nilfs2/Makefile                        |    2 +-
 fs/nilfs2/nilfs.h                         |    8 +
 fs/nilfs2/super.c                         |    9 +-
 fs/nilfs2/sysfs.c                         | 1145 +++++++++++++++++++++++++++++
 fs/nilfs2/sysfs.h                         |  174 +++++
 fs/nilfs2/the_nilfs.c                     |   17 +-
 fs/nilfs2/the_nilfs.h                     |   20 +-
 8 files changed, 1682 insertions(+), 4 deletions(-)
-- 
1.7.9.5


--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux