From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH 4/9] btrfs: export find_delalloc_range
Date: Tue, 17 Sep 2019 14:43:38 -0400 [thread overview]
Message-ID: <20190917184344.13155-5-josef@toxicpanda.com> (raw)
In-Reply-To: <20190917184344.13155-1-josef@toxicpanda.com>
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 | 3 +++
fs/btrfs/extent_io.c | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h
index 6f53387445ca..02fbb0d4fa88 100644
--- a/fs/btrfs/extent-io-tree.h
+++ b/fs/btrfs/extent-io-tree.h
@@ -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);
int extent_invalidatepage(struct extent_io_tree *tree,
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 */
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f5945f0a06da..c47cc2586b37 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1687,9 +1687,9 @@ 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 btrfs_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;
@@ -1807,8 +1807,8 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
/* step one, find a bunch of delalloc bytes starting at start */
delalloc_start = *start;
delalloc_end = 0;
- found = find_delalloc_range(tree, &delalloc_start, &delalloc_end,
- max_bytes, &cached_state);
+ found = btrfs_find_delalloc_range(tree, &delalloc_start, &delalloc_end,
+ max_bytes, &cached_state);
if (!found || delalloc_end <= *start) {
*start = delalloc_start;
*end = delalloc_end;
--
2.21.0
next prev parent reply other threads:[~2019-09-17 18:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 18:43 [PATCH 0/9][V2] btrfs: break up extent_io.c a little bit Josef Bacik
2019-09-17 18:43 ` [PATCH 1/9] btrfs: separate out the extent leak code Josef Bacik
2019-09-17 18:43 ` [PATCH 2/9] btrfs: separate out the extent io init function Josef Bacik
2019-09-17 18:43 ` [PATCH 3/9] btrfs: move extent_io_tree defs to their own header Josef Bacik
2019-09-17 18:43 ` Josef Bacik [this message]
2019-09-17 18:43 ` [PATCH 5/9] btrfs: move the failrec tree stuff into extent-io-tree.h Josef Bacik
2019-09-17 18:43 ` [PATCH 7/9] btrfs: separate out the extent buffer init code Josef Bacik
2019-09-17 18:43 ` [PATCH 8/9] btrfs: migrate the extent_buffer code out of extent-io.h Josef Bacik
2019-09-17 18:43 ` [PATCH 9/9] btrfs: move the extent-buffer code Josef Bacik
-- strict thread matches above, loose matches on Subject: below --
2019-09-23 14:05 [PATCH 0/9][V3] btrfs: break up extent_io.c a little bit Josef Bacik
2019-09-23 14:05 ` [PATCH 4/9] btrfs: export find_delalloc_range Josef Bacik
2019-09-11 15:26 [PATCH 0/9] btrfs: break up extent_io.c a little bit Josef Bacik
2019-09-11 15:26 ` [PATCH 4/9] btrfs: export find_delalloc_range Josef Bacik
2019-09-11 16:02 ` Nikolay Borisov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190917184344.13155-5-josef@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).