summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-09-02 15:22:30 -0400
committerChris Mason <chris.mason@oracle.com>2009-09-11 13:31:07 -0400
commit9655d2982b53fdb38a9e0f2f11315b99b92d66e2 (patch)
treee1271f2f2a3c2c356e0692b36a2d4742b5d651d8 /fs/btrfs/inode.c
parentd5550c6315fe0647b7ac21a6a736bf4a42620eac (diff)
downloadblackbird-op-linux-9655d2982b53fdb38a9e0f2f11315b99b92d66e2.tar.gz
blackbird-op-linux-9655d2982b53fdb38a9e0f2f11315b99b92d66e2.zip
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>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e494545c4202..3f8e93de2989 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1376,7 +1376,7 @@ again:
/* already ordered? We're done */
if (test_range_bit(&BTRFS_I(inode)->io_tree, page_start, page_end,
- EXTENT_ORDERED, 0)) {
+ EXTENT_ORDERED, 0, NULL)) {
goto out;
}
@@ -1417,7 +1417,7 @@ static int btrfs_writepage_start_hook(struct page *page, u64 start, u64 end)
int ret;
ret = test_range_bit(&BTRFS_I(inode)->io_tree, start, end,
- EXTENT_ORDERED, 0);
+ EXTENT_ORDERED, 0, NULL);
if (ret)
return 0;
@@ -1795,7 +1795,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end,
return 0;
if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID &&
- test_range_bit(io_tree, start, end, EXTENT_NODATASUM, 1)) {
+ test_range_bit(io_tree, start, end, EXTENT_NODATASUM, 1, NULL)) {
clear_extent_bits(io_tree, start, end, EXTENT_NODATASUM,
GFP_NOFS);
return 0;
OpenPOWER on IntegriCloud