diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-09-09 17:53:26 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-26 12:28:03 +0200 |
commit | 91af24e48474d9979a70af3894ba7544bb132b82 (patch) | |
tree | a4ca5d9e320bbeecc251ee682a65550b409a6666 /fs/btrfs/extent-io-tree.h | |
parent | 6962541e964ff3004515dad65de92ec63ff4c182 (diff) |
btrfs: temporarily export and move core extent_io_tree tree functions
A lot of the various internals of extent_io_tree call these two
functions for insert or searching the rb tree for entries, so
temporarily export them and then move them to extent-io-tree.c. We
can't move tree_search() without renaming it, and I don't want to
introduce a bunch of churn just to do that, so move these functions
first and then we can move a few big functions and then the remaining
users of tree_search().
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-io-tree.h')
-rw-r--r-- | fs/btrfs/extent-io-tree.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h index d9c1bb70d76b..ce07432954b4 100644 --- a/fs/btrfs/extent-io-tree.h +++ b/fs/btrfs/extent-io-tree.h @@ -279,4 +279,17 @@ void __btrfs_debug_check_extent_io_range(const char *caller, #define btrfs_debug_check_extent_io_range(c, s, e) do {} while (0) #endif +struct tree_entry { + u64 start; + u64 end; + struct rb_node rb_node; +}; + +struct rb_node *tree_search_for_insert(struct extent_io_tree *tree, u64 offset, + struct rb_node ***node_ret, + struct rb_node **parent_ret); +struct rb_node *tree_search_prev_next(struct extent_io_tree *tree, u64 offset, + struct rb_node **prev_ret, + struct rb_node **next_ret); + #endif /* BTRFS_EXTENT_IO_TREE_H */ |