24 May, 2016

1 commit

  • Remove trailing semicolons from macros, as suggested by checkpatch.pl.

    Link: http://lkml.kernel.org/r/1461935747-10380-12-git-send-email-konishi.ryusuke@lab.ntt.co.jp
    [konishi.ryusuke@lab.ntt.co.jp: fix style issues]
    Link: http://lkml.kernel.org/r/20160509.231703.1481729973362188932.konishi.ryusuke@lab.ntt.co.jp
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     

09 Aug, 2014

8 commits

  • This patch adds creation of group for every mounted
    snapshot in /sys/fs/nilfs2//mounted_snapshots group.

    The group contains details about mounted snapshot:
    (1) inodes_count - show number of inodes for snapshot.
    (2) blocks_count - show number of blocks for snapshot.

    Signed-off-by: Vyacheslav Dubeyko
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Cc: Michael L. Semon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • This patch adds creation of /sys/fs/nilfs2//mounted_snapshots
    group.

    The mounted_snapshots group contains group for every
    mounted snapshot.

    Signed-off-by: Vyacheslav Dubeyko
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Cc: Michael L. Semon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • This patch adds creation of /sys/fs/nilfs2//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
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Cc: Michael L. Semon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • This patch adds creation of /sys/fs/nilfs2//segments
    group.

    The segments group contains attributes that describe
    details about volume's segments:
    (1) segments_number - show number of segments on volume.
    (2) blocks_per_segment - show number of blocks in segment.
    (3) clean_segments - show count of clean segments.
    (4) dirty_segments - show count of dirty segments.

    Signed-off-by: Vyacheslav Dubeyko
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Cc: Michael L. Semon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • This patch adds creation of /sys/fs/nilfs2//segctor
    group.

    The segctor group contains attributes that describe
    segctor thread activity details:
    (1) last_pseg_block - show start block number of the latest segment.
    (2) last_seg_sequence - show sequence value of the latest segment.
    (3) last_seg_checkpoint - show checkpoint number of the latest segment.
    (4) current_seg_sequence - show segment sequence counter.
    (5) current_last_full_seg - show index number of the latest full segment.
    (6) next_full_seg - show index number of the full segment index
    to be used next.
    (7) next_pseg_offset - show offset of next partial segment in
    the current full segment.
    (8) next_checkpoint - show next checkpoint number.
    (9) last_seg_write_time - show write time of the last segment
    in human-readable format.
    (10) last_seg_write_time_secs - show write time of the last segment
    in seconds.
    (11) last_nongc_write_time - show write time of the last segment
    not for cleaner operation in human-readable format.
    (12) last_nongc_write_time_secs - show write time of the last segment
    not for cleaner operation in seconds.
    (13) dirty_data_blocks_count - show number of dirty data blocks.

    Signed-off-by: Vyacheslav Dubeyko
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Cc: Michael L. Semon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • This patch adds creation of /sys/fs/nilfs2//superblock
    group.

    The superblock group contains attributes that describe
    superblock's details:
    (1) sb_write_time - show previous write time of super block in
    human-readable format.
    (2) sb_write_time_secs - show previous write time of super block
    in seconds.
    (3) sb_write_count - show write count of super block.
    (4) sb_update_frequency - show/set interval of periodical update
    of superblock (in seconds). You can set preferable frequency of
    superblock update by command:

    echo > /sys/fs/nilfs2//superblock/sb_update_frequency

    Signed-off-by: Vyacheslav Dubeyko
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Cc: Michael L. Semon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • This patch adds creation of /sys/fs/nilfs2/ group.

    The group contains attributes that describe file
    system partition's details:
    (1) revision - show NILFS file system revision.
    (2) blocksize - show volume block size in bytes.
    (3) device_size - show volume size in bytes.
    (4) free_blocks - show count of free blocks on volume.
    (5) uuid - show volume's UUID.
    (6) volume_name - show volume's name.

    Signed-off-by: Vyacheslav Dubeyko
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Cc: Michael L. Semon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • This 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.

    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//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/ - group contains attributes that describe file
    system partition's details
    (4) /sys/fs/nilfs2//superblock - group contains attributes that describe
    superblock's details
    (5) /sys/fs/nilfs2//segctor - group contains attributes that describe
    segctor thread activity details
    (6) /sys/fs/nilfs2//segments - group contains attributes that describe
    details about volume's segments
    (7) /sys/fs/nilfs2//checkpoints - group contains attributes that describe
    details about volume's checkpoints
    (8) /sys/fs/nilfs2//mounted_snapshots - group contains group for every
    mounted snapshot
    (9) /sys/fs/nilfs2//mounted_snapshots/ - group contains
    details about mounted snapshot

    This patch (of 9):

    This patch adds code of creation /sys/fs/nilfs2 group and
    /sys/fs/nilfs2/features group.

    The features group contains attributes that describe NILFS
    file system driver features:
    (1) revision - show current revision of NILFS file system driver.

    There are two formats of timestamp output - seconds and human-readable
    format. Every showed timestamp has two sysfs files (time- and
    time--secs). One sysfs file (time-) shows time in
    human-readable format. Another sysfs file (time--secs) shows time in
    seconds.

    It was reported by Michael Semon that timestamp output in human-readable
    format should be changed from "2014-4-12 14:5:38" to "2014-04-12
    14:05:38". Second version of the patch fixes this issue.

    Reported-by: Michael L. Semon
    Signed-off-by: Vyacheslav Dubeyko
    Cc: Vyacheslav Dubeyko
    Cc: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko