Btrfs: use a cached state for extent state operations during delalloc
This changes the btrfs code to find delalloc ranges in the extent state tree to use the new state caching code from set/test bit. It reduces one of the biggest causes of rbtree searches in the writeback path. test_range_bit is also modified to take the cached state as a starting point while searching. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -2180,7 +2180,7 @@ static int tree_block_processed(u64 bytenr, u32 blocksize,
|
||||
struct reloc_control *rc)
|
||||
{
|
||||
if (test_range_bit(&rc->processed_blocks, bytenr,
|
||||
bytenr + blocksize - 1, EXTENT_DIRTY, 1))
|
||||
bytenr + blocksize - 1, EXTENT_DIRTY, 1, NULL))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user