diff options
author | Nikolay Borisov <nborisov@suse.com> | 2019-03-27 14:24:17 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:38 +0200 |
commit | 45bfcfc168f84f498d9825ec20ff3f4ee9208e04 (patch) | |
tree | 6b0edd5cf7e333b87bbc69921425fbc25f540e0e /fs/btrfs/extent_io.h | |
parent | 8811133d8a982d3cef5d25eef54a8dca9e8e6ded (diff) | |
download | lwn-45bfcfc168f84f498d9825ec20ff3f4ee9208e04.tar.gz lwn-45bfcfc168f84f498d9825ec20ff3f4ee9208e04.zip |
btrfs: Implement find_first_clear_extent_bit
This function is very similar to find_first_extent_bit except that it
locates the first contiguous span of space which does not have bits set.
It's intended use is in the freespace trimming code.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 1680832d2c88..f7ca1516f70b 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -403,6 +403,8 @@ static inline int set_extent_uptodate(struct extent_io_tree *tree, u64 start, int find_first_extent_bit(struct extent_io_tree *tree, u64 start, u64 *start_ret, u64 *end_ret, unsigned bits, struct extent_state **cached_state); +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); int extent_write_full_page(struct page *page, struct writeback_control *wbc); |