@@ -19,18 +19,6 @@
#include "space-info.h"
#include "block-group.h"
-struct btrfs_feature_attr {
- struct kobj_attribute kobj_attr;
- enum btrfs_feature_set feature_set;
- u64 feature_bit;
-};
-
-/* For raid type sysfs entries */
-struct raid_kobject {
- u64 flags;
- struct kobject kobj;
-};
-
#define __INIT_KOBJ_ATTR(_name, _mode, _show, _store) \
{ \
.attr = { .name = __stringify(_name), .mode = _mode }, \
@@ -49,6 +37,12 @@ struct raid_kobject {
#define BTRFS_ATTR_PTR(_prefix, _name) \
(&btrfs_attr_##_prefix##_##_name.attr)
+struct btrfs_feature_attr {
+ struct kobj_attribute kobj_attr;
+ enum btrfs_feature_set feature_set;
+ u64 feature_bit;
+};
+
#define BTRFS_FEAT_ATTR(_name, _feature_set, _feature_prefix, _feature_bit) \
static struct btrfs_feature_attr btrfs_attr_features_##_name = { \
.kobj_attr = __INIT_KOBJ_ATTR(_name, S_IRUGO, \
@@ -394,6 +388,12 @@ static ssize_t global_rsv_reserved_show(struct kobject *kobj,
}
BTRFS_ATTR(allocation, global_rsv_reserved, global_rsv_reserved_show);
+/* For raid type sysfs entries */
+struct raid_kobject {
+ u64 flags;
+ struct kobject kobj;
+};
+
#define to_space_info(_kobj) container_of(_kobj, struct btrfs_space_info, kobj)
#define to_raid_kobj(_kobj) container_of(_kobj, struct raid_kobject, kobj)
Move struct btrfs_feature_attr and struct raid_kobject near functions and defines where its used. No functional change. Signed-off-by: Anand Jain <anand.jain@oracle.com> --- fs/btrfs/sysfs.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)