diff options
author | Josef Bacik <josef@redhat.com> | 2011-09-26 13:56:12 -0400 |
---|---|---|
committer | Josef Bacik <josef@redhat.com> | 2011-10-19 15:12:47 -0400 |
commit | 462d6fac8960a3ba797927adfcbd29d503eb16fd (patch) | |
tree | 82e72468a746b55d09246db8272823c2907633e1 /fs/btrfs/extent_io.h | |
parent | ef3be45722317f8c2fb0e861065df0c3830ff9ac (diff) |
Btrfs: introduce convert_extent_bit
If I have a range where I know a certain bit is and I want to set it to another
bit the only option I have is to call set and then clear bit, which will result
in 2 tree searches. This is inefficient, so introduce convert_extent_bit which
will go through and set the bit I want and clear the old bit I don't want.
Thanks,
Signed-off-by: Josef Bacik <josef@redhat.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 7b2f0c3e7929..cea445dcd806 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -214,6 +214,8 @@ int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, | |||
214 | gfp_t mask); | 214 | gfp_t mask); |
215 | int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, | 215 | int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, |
216 | gfp_t mask); | 216 | gfp_t mask); |
217 | int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, | ||
218 | int bits, int clear_bits, gfp_t mask); | ||
217 | int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end, | 219 | int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end, |
218 | struct extent_state **cached_state, gfp_t mask); | 220 | struct extent_state **cached_state, gfp_t mask); |
219 | int find_first_extent_bit(struct extent_io_tree *tree, u64 start, | 221 | int find_first_extent_bit(struct extent_io_tree *tree, u64 start, |