Commit 083e75e7 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: export find_delalloc_range

This utilizes internal stuff to the extent_io_tree, so we need to export
it before we move it.
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9c7d3a54
...@@ -223,5 +223,8 @@ void find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start, ...@@ -223,5 +223,8 @@ void find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start,
u64 *start_ret, u64 *end_ret, unsigned bits); u64 *start_ret, u64 *end_ret, unsigned bits);
int extent_invalidatepage(struct extent_io_tree *tree, int extent_invalidatepage(struct extent_io_tree *tree,
struct page *page, unsigned long offset); struct page *page, unsigned long offset);
bool btrfs_find_delalloc_range(struct extent_io_tree *tree, u64 *start,
u64 *end, u64 max_bytes,
struct extent_state **cached_state);
#endif /* BTRFS_EXTENT_IO_TREE_H */ #endif /* BTRFS_EXTENT_IO_TREE_H */
...@@ -1686,8 +1686,8 @@ void find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start, ...@@ -1686,8 +1686,8 @@ void find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start,
* *
* true is returned if we find something, false if nothing was in the tree * true is returned if we find something, false if nothing was in the tree
*/ */
static noinline bool find_delalloc_range(struct extent_io_tree *tree, bool btrfs_find_delalloc_range(struct extent_io_tree *tree, u64 *start,
u64 *start, u64 *end, u64 max_bytes, u64 *end, u64 max_bytes,
struct extent_state **cached_state) struct extent_state **cached_state)
{ {
struct rb_node *node; struct rb_node *node;
...@@ -1806,7 +1806,7 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode, ...@@ -1806,7 +1806,7 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
/* step one, find a bunch of delalloc bytes starting at start */ /* step one, find a bunch of delalloc bytes starting at start */
delalloc_start = *start; delalloc_start = *start;
delalloc_end = 0; delalloc_end = 0;
found = find_delalloc_range(tree, &delalloc_start, &delalloc_end, found = btrfs_find_delalloc_range(tree, &delalloc_start, &delalloc_end,
max_bytes, &cached_state); max_bytes, &cached_state);
if (!found || delalloc_end <= *start) { if (!found || delalloc_end <= *start) {
*start = delalloc_start; *start = delalloc_start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment