Btrfs: use a cached state for extent state operations during delalloc
authorChris Mason <chris.mason@oracle.com>
Wed, 2 Sep 2009 19:22:30 +0000 (15:22 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 11 Sep 2009 17:31:07 +0000 (13:31 -0400)
commit9655d2982b53fdb38a9e0f2f11315b99b92d66e2
treee1271f2f2a3c2c356e0692b36a2d4742b5d651d8
parentd5550c6315fe0647b7ac21a6a736bf4a42620eac
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>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c
fs/btrfs/ordered-data.c
fs/btrfs/relocation.c