diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-08-05 12:57:59 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-09-11 13:31:03 -0400 |
commit | 40431d6c1288793a682fc6f5e5b5c9d5cac34608 (patch) | |
tree | a840fb38459476ff0aecda8369f965c344a25562 /fs/btrfs/file.c | |
parent | 9042846bc7ae69cc3288d85af6bad16208d93a95 (diff) |
Btrfs: optimize set extent bit
The Btrfs set_extent_bit call currently searches the rbtree
every time it needs to find more extent_state objects to fill
the requested operation.
This adds a simple test with rb_next to see if the next object
in the tree was adjacent to the one we just found. If so,
we skip the search and just use the next object.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 7c3cd248d8d6..a760d97279ac 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -136,8 +136,6 @@ static noinline int dirty_and_release_pages(struct btrfs_trans_handle *trans, | |||
136 | btrfs_set_trans_block_group(trans, inode); | 136 | btrfs_set_trans_block_group(trans, inode); |
137 | hint_byte = 0; | 137 | hint_byte = 0; |
138 | 138 | ||
139 | set_extent_uptodate(io_tree, start_pos, end_of_last_block, GFP_NOFS); | ||
140 | |||
141 | /* check for reserved extents on each page, we don't want | 139 | /* check for reserved extents on each page, we don't want |
142 | * to reset the delalloc bit on things that already have | 140 | * to reset the delalloc bit on things that already have |
143 | * extents reserved. | 141 | * extents reserved. |