btrfs: sysfs: make UUID/debug have its own kobject
authorDennis Zhou <dennis@kernel.org>
Sat, 14 Dec 2019 00:22:18 +0000 (16:22 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 20 Jan 2020 15:40:58 +0000 (16:40 +0100)
commit93945cb43ead1e22e0d5ab50ae361a62cb783ab2
treed5986db6418c2d0294098a1f24b3c878ee0fcb79
parent71e8978eb456958784539f02fa56087300f3a993
btrfs: sysfs: make UUID/debug have its own kobject

Btrfs only allowed attributes to be exposed in debug/. Let's let other
groups be created by making debug its own kobject.

This also makes the per-fs debug options separate from the global
features mount attributes. This seems to be needed as
sysfs_create_files() requires const struct attribute * while
sysfs_create_group() can take struct attribute *. This seems nicer as
per file system, you'll probably use to_fs_info().

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/sysfs.c