[PATCH 0/6] xfs sysfs support
Brian Foster
bfoster at redhat.com
Fri Jun 6 08:13:28 CDT 2014
Hi all,
Here's a first version of sysfs support for XFS. This is based on and
incorporates feedback from the rfc, available here:
http://oss.sgi.com/archives/xfs/2014-05/msg00425.html
The idea of using debugfs instead was brought up, but not much
discussion around it, so I've left things as is with respect to using
sysfs.
This series creates new xfs_sysfs.[c,h] source files to contain the
general infrastructure for sysfs attribute files in XFS, creates a
global kset for the module (represented as /sys/fs/xfs) and embeds a
couple kobjects to start creating an attribute heirarchy.
Patch 1 fixes what looks like a couple minor error handling errors in
xfs_mountfs(). Patches 2-5 add the sysfs infrastructure, objects and
attributes. Patch 6 adds documentation for the newly defined attributes.
Thoughts, reviews, flames appreciated.
Brian
v1:
- Move sysfs infrastructure code to new source file, add helpers for
object initialization, etc.
- Created an xfs_mount->xlog object heirarchy for attributes associated
with the log.
- Renamed the reserve/write grant head attributes to
'[reserve,write]_grant_head.'
- Use the 'cycle:block' or 'cycle:bytes' decimal format for attributes
(rather than export encoded values).
- Included generic mountfs fix and doc.
Brian Foster (6):
xfs: fix a couple error sequence jumps in xfs_mountfs()
xfs: add a sysfs kset
xfs: add xfs_mount sysfs kobject
xfs: add xlog sysfs kobject and attribute handlers
xfs: add log attributes for log lsn and grant head data
xfs: document log sysfs attributes in testing ABI
Documentation/ABI/testing/sysfs-fs-xfs | 39 ++++++++
fs/xfs/Makefile | 1 +
fs/xfs/xfs_log.c | 9 ++
fs/xfs/xfs_log_priv.h | 3 +
fs/xfs/xfs_mount.c | 19 +++-
fs/xfs/xfs_mount.h | 2 +
fs/xfs/xfs_super.c | 12 ++-
fs/xfs/xfs_sysfs.c | 175 +++++++++++++++++++++++++++++++++
fs/xfs/xfs_sysfs.h | 47 +++++++++
9 files changed, 303 insertions(+), 4 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-fs-xfs
create mode 100644 fs/xfs/xfs_sysfs.c
create mode 100644 fs/xfs/xfs_sysfs.h
--
1.8.3.1
More information about the xfs
mailing list