[4/9] btrfs: export find_delalloc_range
diff mbox series

Message ID 20190911152611.3393-5-josef@toxicpanda.com
State New
Headers show
Series
  • btrfs: break up extent_io.c a little bit
Related show

Commit Message

Josef Bacik Sept. 11, 2019, 3:26 p.m. UTC
This utilizes internal stuff to the extent_io_tree, so we need to export
it before we move it.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/extent-io-tree.h | 2 ++
 fs/btrfs/extent_io.c      | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Nikolay Borisov Sept. 11, 2019, 4:02 p.m. UTC | #1
On 11.09.19 г. 18:26 ч., Josef Bacik wrote:
> This utilizes internal stuff to the extent_io_tree, so we need to export
> it before we move it.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
>  fs/btrfs/extent-io-tree.h | 2 ++
>  fs/btrfs/extent_io.c      | 5 ++---
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h
> index 6f53387445ca..1c301681babe 100644
> --- a/fs/btrfs/extent-io-tree.h
> +++ b/fs/btrfs/extent-io-tree.h
> @@ -223,5 +223,7 @@ void find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start,
>  				 u64 *start_ret, u64 *end_ret, unsigned bits);
>  int extent_invalidatepage(struct extent_io_tree *tree,
>  			  struct page *page, unsigned long offset);
> +bool find_delalloc_range(struct extent_io_tree *tree, u64 *start, u64 *end,
> +			 u64 max_bytes, struct extent_state **cached_state);

For non-static functions I'd rather have them prefixed with btrfs_

>  
>  #endif /* BTRFS_EXTENT_IO_TREE_H */
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index f5945f0a06da..751353c88203 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -1687,9 +1687,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
>   */
> -static noinline bool find_delalloc_range(struct extent_io_tree *tree,
> -					u64 *start, u64 *end, u64 max_bytes,
> -					struct extent_state **cached_state)
> +bool find_delalloc_range(struct extent_io_tree *tree, u64 *start, u64 *end,
> +			 u64 max_bytes, struct extent_state **cached_state)
>  {
>  	struct rb_node *node;
>  	struct extent_state *state;
>

Patch
diff mbox series

diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h
index 6f53387445ca..1c301681babe 100644
--- a/fs/btrfs/extent-io-tree.h
+++ b/fs/btrfs/extent-io-tree.h
@@ -223,5 +223,7 @@  void find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start,
 				 u64 *start_ret, u64 *end_ret, unsigned bits);
 int extent_invalidatepage(struct extent_io_tree *tree,
 			  struct page *page, unsigned long offset);
+bool 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 */
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f5945f0a06da..751353c88203 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1687,9 +1687,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
  */
-static noinline bool find_delalloc_range(struct extent_io_tree *tree,
-					u64 *start, u64 *end, u64 max_bytes,
-					struct extent_state **cached_state)
+bool find_delalloc_range(struct extent_io_tree *tree, u64 *start, u64 *end,
+			 u64 max_bytes, struct extent_state **cached_state)
 {
 	struct rb_node *node;
 	struct extent_state *state;