Commit Graph

4 Commits

Author SHA1 Message Date
Zach Brown
97f3971dcd scoutfs: add rid sysfs file
Add a "rid" file along the "fsid" file in the per-mount sysfs dir that
gives the mounts rid.

Signed-off-by: Zach Brown <zab@versity.com>
2019-08-20 15:52:13 -07:00
Zach Brown
bd7a7fe97e scoutfs: use fr identity in pseudo fs paths
Use the fr mount identity string in the sysfs/fs/ and debugfs paths we
register for each mount.

Signed-off-by: Zach Brown <zab@versity.com>
2019-08-20 15:52:13 -07:00
Zach Brown
2cc4f89ad5 scoutfs: add sysfs attrs wrappers
Add some helpers to manage the lifetime of groups of attributes in
sysfs.  We can wait until the sysfs files are no longer in use
before tearing down the data that they rely on.

Signed-off-by: Zach Brown <zab@versity.com>
2019-05-30 13:51:02 -07:00
Zach Brown
e354fd18b1 scoutfs: add sysfs.c, fsid file
I wanted to add a sysfs file that exports the fsid for the mount of a
given device.  But our use of sysfs was confusing and spread through
super.c and counters.c.

This moves the core of our sysfs use to sysfs.c.  Instead of defining
the per-mount dir as a kset we define it as an object with attributes
which gives us a place to add an fsid attribute.

counters still have their own whack of sysfs implementation.  We'll let
it keep it for now but we could move it into sysfs.c.  It's just counter
interation around the insane sysfs obj/attr/type nonsense.  For now it
just needs to know to add its counters dir as a child of the per-mount
dir instead of adding it to the kset.

Signed-off-by: Zach Brown <zab@versity.com>
2017-12-20 12:21:13 -08:00