bcachefs: Split out disk_groups_types.h
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 14:58:38 +0000 (10:58 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 31 Oct 2023 16:18:37 +0000 (12:18 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/disk_groups.h
fs/bcachefs/disk_groups_types.h [new file with mode: 0644]
fs/bcachefs/super_types.h

index 9863571feebf38503f655218c855a06c1efb4a62..1e0191197de1601378dac05d57dace525e865f30 100644 (file)
@@ -418,6 +418,7 @@ enum bch_time_stats {
 #include "buckets_types.h"
 #include "buckets_waiting_for_journal_types.h"
 #include "clock_types.h"
+#include "disk_groups_types.h"
 #include "ec_types.h"
 #include "journal_types.h"
 #include "keylist_types.h"
index ab17dbaaf84274ba29a453e9a0b8a7223086de2b..e03ccc7f13da3f136f4409ebd2e47c40485ba1d7 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _BCACHEFS_DISK_GROUPS_H
 #define _BCACHEFS_DISK_GROUPS_H
 
+#include "disk_groups_types.h"
+
 extern const struct bch_sb_field_ops bch_sb_field_ops_disk_groups;
 
 static inline unsigned disk_groups_nr(struct bch_sb_field_disk_groups *groups)
diff --git a/fs/bcachefs/disk_groups_types.h b/fs/bcachefs/disk_groups_types.h
new file mode 100644 (file)
index 0000000..55a67a4
--- /dev/null
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _BCACHEFS_DISK_GROUPS_TYPES_H
+#define _BCACHEFS_DISK_GROUPS_TYPES_H
+
+struct bch_disk_group_cpu {
+       bool                            deleted;
+       u16                             parent;
+       struct bch_devs_mask            devs;
+};
+
+struct bch_disk_groups_cpu {
+       struct rcu_head                 rcu;
+       unsigned                        nr;
+       struct bch_disk_group_cpu       entries[] __counted_by(nr);
+};
+
+#endif /* _BCACHEFS_DISK_GROUPS_TYPES_H */
index 78d6138db62d7e4a1f1fe07bb043ca7ada417986..7dda4985b99fe6cfdde52c6df869e3df446d48d0 100644 (file)
@@ -37,16 +37,4 @@ struct bch_member_cpu {
        u8                      valid;
 };
 
-struct bch_disk_group_cpu {
-       bool                            deleted;
-       u16                             parent;
-       struct bch_devs_mask            devs;
-};
-
-struct bch_disk_groups_cpu {
-       struct rcu_head                 rcu;
-       unsigned                        nr;
-       struct bch_disk_group_cpu       entries[] __counted_by(nr);
-};
-
 #endif /* _BCACHEFS_SUPER_TYPES_H */