btrfs: move uuid tree prototypes to uuid-tree.h
authorJosef Bacik <josef@toxicpanda.com>
Wed, 26 Oct 2022 19:08:28 +0000 (15:08 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:46 +0000 (18:00 +0100)
Move these out of ctree.h into uuid-tree.h to cut down on the code in
ctree.h.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/transaction.c
fs/btrfs/uuid-tree.c
fs/btrfs/uuid-tree.h [new file with mode: 0644]
fs/btrfs/volumes.c

index 6bfea55c82a04a5a96d66bf7e3eaf0b9e1803180..910a23e7cd8fcab2cc324ba37eeb63f9c1843936 100644 (file)
@@ -682,13 +682,6 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
                        struct extent_buffer *node,
                        struct extent_buffer *parent);
 
-/* uuid-tree.c */
-int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
-                       u64 subid);
-int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
-                       u64 subid);
-int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info);
-
 /* orphan.c */
 int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans,
                             struct btrfs_root *root, u64 offset);
index 2f7dd79a5a35987e06f2e15acc358f4ee293f091..e8082e3c5bdc97c386b70d2519462043073e49d6 100644 (file)
@@ -48,6 +48,7 @@
 #include "extent-tree.h"
 #include "root-tree.h"
 #include "defrag.h"
+#include "uuid-tree.h"
 
 #define BTRFS_SUPER_FLAG_SUPP  (BTRFS_HEADER_FLAG_WRITTEN |\
                                 BTRFS_HEADER_FLAG_RELOC |\
index 7231f6b69096750a3769174aff7793f988d43f12..061fa09237726029abefdcc68399e3b04a8d108a 100644 (file)
@@ -62,6 +62,7 @@
 #include "defrag.h"
 #include "dir-item.h"
 #include "file-item.h"
+#include "uuid-tree.h"
 
 struct btrfs_iget_args {
        u64 ino;
index 41599b06802619c1812276e94e68ebb900181b76..c2439aebebd4be71e6ba0967a93e6b79a2ca8927 100644 (file)
@@ -56,6 +56,7 @@
 #include "root-tree.h"
 #include "defrag.h"
 #include "dir-item.h"
+#include "uuid-tree.h"
 
 #ifdef CONFIG_64BIT
 /* If we have a 32-bit userspace and 64-bit kernel, then the UAPI
index a0b7702d980ff86ed53c15f13756e4956166a458..c6fe2ab8716bcb88ebef20a65ff40bdf6f07e732 100644 (file)
@@ -30,6 +30,7 @@
 #include "root-tree.h"
 #include "defrag.h"
 #include "dir-item.h"
+#include "uuid-tree.h"
 
 static struct kmem_cache *btrfs_trans_handle_cachep;
 
index 70304b89f31f62704244b0703d5b51b6e1e1a786..7c7001f42b14c9e42bb09085ce6d051fc30866b3 100644 (file)
@@ -12,6 +12,7 @@
 #include "print-tree.h"
 #include "fs.h"
 #include "accessors.h"
+#include "uuid-tree.h"
 
 static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key)
 {
diff --git a/fs/btrfs/uuid-tree.h b/fs/btrfs/uuid-tree.h
new file mode 100644 (file)
index 0000000..5350c87
--- /dev/null
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef BTRFS_UUID_TREE_H
+#define BTRFS_UUID_TREE_H
+
+int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
+                       u64 subid);
+int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
+                       u64 subid);
+int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info);
+
+#endif
index f61bb79d4a7e68b7e6cc3f72fecbea0d733e3417..55164b2dba2ae97d10f464c4085068f2353b2fd0 100644 (file)
@@ -35,6 +35,7 @@
 #include "zoned.h"
 #include "fs.h"
 #include "accessors.h"
+#include "uuid-tree.h"
 
 static struct bio_set btrfs_bioset;