From fec4fc82b531beb2cc67b734140ffe776af33f7c Mon Sep 17 00:00:00 2001 From: Brian Foster Date: Tue, 30 May 2023 14:41:50 -0400 Subject: 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 Signed-off-by: Kent Overstreet --- fs/bcachefs/disk_groups.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/bcachefs/disk_groups.h') diff --git a/fs/bcachefs/disk_groups.h b/fs/bcachefs/disk_groups.h index e4470c357a66..bf39db3868bf 100644 --- a/fs/bcachefs/disk_groups.h +++ b/fs/bcachefs/disk_groups.h @@ -88,4 +88,6 @@ int bch2_dev_group_set(struct bch_fs *, struct bch_dev *, const char *); const char *bch2_sb_validate_disk_groups(struct bch_sb *, struct bch_sb_field *); +void bch2_disk_groups_to_text(struct printbuf *, struct bch_fs *); + #endif /* _BCACHEFS_DISK_GROUPS_H */ -- cgit v1.2.3