bcachefs: create internal disk_groups sysfs file
authorBrian Foster <bfoster@redhat.com>
Tue, 30 May 2023 18:41:50 +0000 (14:41 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:03 +0000 (17:10 -0400)
commitfec4fc82b531beb2cc67b734140ffe776af33f7c
tree69eb17cf9b842e4ae2071a30a9ccc8c1d9afb7b9
parent28551613b725c28552210121499f4e2f6c6a9054
bcachefs: create internal disk_groups sysfs file

We have bch2_sb_disk_groups_to_text() to dump disk group labels, but
no good information on device group membership at runtime. Add
bch2_disk_groups_to_text() and an associated 'disk_groups' sysfs
file to print group and device relationships.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_groups.c
fs/bcachefs/disk_groups.h
fs/bcachefs/sysfs.c