• Bill O'Donnell's avatar
    xfs: per-filesystem stats in sysfs · 225e4635
    Bill O'Donnell authored
    This patch implements per-filesystem stats objects in sysfs. It
    depends on the application of the previous patch series that
    develops the infrastructure to support both xfs global stats and
    xfs per-fs stats in sysfs.
    
    Stats objects are instantiated when an xfs filesystem is mounted
    and deleted on unmount. With this patch, the stats directory is
    created and populated with the familiar stats and stats_clear files.
    Example:
            /sys/fs/xfs/sda9/stats/stats
            /sys/fs/xfs/sda9/stats/stats_clear
    
    With this patch, the individual counts within the new per-fs
    stats file(s) remain at zero. Functions that use the the macros
    to increment, decrement, and add-to the per-fs stats counts will
    be covered in a separate new patch to follow this one. Note that
    the counts within the global stats file (/sys/fs/xfs/stats/stats)
    advance normally and can be cleared as it was prior to this patch.
    
    [dchinner: move setup/teardown to xfs_fs_{fill|put}_super() so
    it is down before/after any path that uses the per-mount stats. ]
    Signed-off-by: default avatarBill O'Donnell <billodo@redhat.com>
    Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    225e4635
xfs_mount.h 13.5 KB