Skip to content

BTRFS sysfs support

Goffredo Baroncelli linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v0 Latest4 patches 1 replyIn review

Patches in v0 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add support for sysfs to btrfs.fs/btrfs/super.c fs/btrfs/sysfs.c fs/btrfs/sysfs.h+963 -51 reply
2/4Add hook for sysfs to btrfs.fs/btrfs/volumes.c+14 -10 replies
3/4Add a new Kconfig section to enable or disable the sysfs.fs/btrfs/Kconfig+9 -00 replies
4/4Btrfs sysfs support documentation.Documentation/filesystems/btrfs.txt+75 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v0 yet.

Read the v0 thread

Cover letter [PATCH v0 0/4] BTRFS sysfs support

Hi all,
The following series restores the BTRFS sysfs support. My idea is to exporting some information via sysfs to get rid of some ioctl(s) which are particular solution of a more general problem: exporting information from kernel space to user space.

These patches export basically the fields of the following structure:
- btrfs_device
- btrfs_fs_info
- btrfs_fs_devices

You can read more about which information are exported reading the patch (the last one) which contains an update of the btrfs.txt file.

The goal of this first attempt is to collect comments relating to which information we should export and which not or the sysfs structure.

For now these information are read-only. In the future we could consider the idea to make some action: for example to change the label of a filesystem.

Comments are welcome.
BR
G.Baroncelli

---

Goffredo Baroncelli (4):
Add support for sysfs to btrfs.
Add hook for sysfs to btrfs.
Add a new Kconfig section to enable or disable the sysfs. Btrfs sysfs support documentation.

 fs/btrfs/Kconfig   |    9 +
 fs/btrfs/super.c   |    4 
 fs/btrfs/sysfs.c   |  933 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/sysfs.h   |   31 ++
 fs/btrfs/volumes.c |   15 +
 5 files changed, 986 insertions(+), 6 deletions(-)
 create mode 100644 fs/btrfs/sysfs.h