Commit 4ca73656 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Implement set_extent_bits_nowait

It will be used in a future patch that will require modifying an
extent_io_tree struct under a spinlock.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 930b0907
...@@ -1368,6 +1368,13 @@ int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, ...@@ -1368,6 +1368,13 @@ int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
changeset); changeset);
} }
int set_extent_bits_nowait(struct extent_io_tree *tree, u64 start, u64 end,
unsigned bits)
{
return __set_extent_bit(tree, start, end, bits, 0, NULL, NULL,
GFP_NOWAIT, NULL);
}
int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
unsigned bits, int wake, int delete, unsigned bits, int wake, int delete,
struct extent_state **cached) struct extent_state **cached)
......
...@@ -328,6 +328,8 @@ int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, ...@@ -328,6 +328,8 @@ int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
unsigned bits, u64 *failed_start, unsigned bits, u64 *failed_start,
struct extent_state **cached_state, gfp_t mask); struct extent_state **cached_state, gfp_t mask);
int set_extent_bits_nowait(struct extent_io_tree *tree, u64 start, u64 end,
unsigned bits);
static inline int set_extent_bits(struct extent_io_tree *tree, u64 start, static inline int set_extent_bits(struct extent_io_tree *tree, u64 start,
u64 end, unsigned bits) u64 end, unsigned bits)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment