summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-io-tree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2020-08-14 11:35:16 +0200
committerDavid Sterba <dsterba@suse.com>2023-10-12 16:44:14 +0200
commit893fe2439994666d94dbe19f5fd59cec17c8f0a8 (patch)
tree0dd3b9b5b44e010253b14cebf417bf55b18f949e /fs/btrfs/extent-io-tree.h
parent99be1a66e1fe6c62fbd7c1b0c50ea38c33ffdd5a (diff)
downloadlinux-893fe2439994666d94dbe19f5fd59cec17c8f0a8.tar.gz
linux-893fe2439994666d94dbe19f5fd59cec17c8f0a8.tar.bz2
linux-893fe2439994666d94dbe19f5fd59cec17c8f0a8.zip
btrfs: change test_range_bit to scan the whole range
The semantics of test_range_bit() with filled == 0 is now in it's own helper so test_range_bit will check the whole range unconditionally. The detection logic is flipped and assumes success by default and catches exceptions. 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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h
index 336b7e8c0f86..93c8eddadc03 100644
--- a/fs/btrfs/extent-io-tree.h
+++ b/fs/btrfs/extent-io-tree.h
@@ -131,8 +131,8 @@ u64 count_range_bits(struct extent_io_tree *tree,
struct extent_state **cached_state);
void free_extent_state(struct extent_state *state);
-int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end,
- u32 bits, int filled, struct extent_state *cached_state);
+bool test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, u32 bit,
+ struct extent_state *cached_state);
bool test_range_bit_exists(struct extent_io_tree *tree, u64 start, u64 end, u32 bit);
int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
u32 bits, struct extent_changeset *changeset);