summaryrefslogtreecommitdiff
path: root/fs/btrfs/ordered-data.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2010-02-02 20:51:14 +0000
committerChris Mason <chris.mason@oracle.com>2010-03-15 11:00:13 -0400
commit5a1a3df1f6c86926cfe8657e6f9b4b4c2f467d60 (patch)
treebc73836bf0bde137da48eaff72dae75ee729aaba /fs/btrfs/ordered-data.h
parentc2a128d28a2e78e159e17e8c9274d0a9d9492555 (diff)
downloadlinux-3.10-5a1a3df1f6c86926cfe8657e6f9b4b4c2f467d60.tar.gz
linux-3.10-5a1a3df1f6c86926cfe8657e6f9b4b4c2f467d60.tar.bz2
linux-3.10-5a1a3df1f6c86926cfe8657e6f9b4b4c2f467d60.zip
Btrfs: cache ordered extent when completing io
When finishing io we run btrfs_dec_test_ordered_pending, and then immediately run btrfs_lookup_ordered_extent, but btrfs_dec_test_ordered_pending does that already, so we're searching twice when we don't have to. This patch lets us pass a btrfs_ordered_extent in to btrfs_dec_test_ordered_pending so if we do complete io on that ordered extent we can just use the one we found then instead of having to do another btrfs_lookup_ordered_extent. This made my fio job with the other patch go from 24 mb/s to 29 mb/s. Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ordered-data.h')
-rw-r--r--fs/btrfs/ordered-data.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h
index bfbcebbb0ad..c82f76a9f04 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -137,7 +137,8 @@ int btrfs_put_ordered_extent(struct btrfs_ordered_extent *entry);
int btrfs_remove_ordered_extent(struct inode *inode,
struct btrfs_ordered_extent *entry);
int btrfs_dec_test_ordered_pending(struct inode *inode,
- u64 file_offset, u64 io_size);
+ struct btrfs_ordered_extent **cached,
+ u64 file_offset, u64 io_size);
int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
u64 start, u64 len, u64 disk_len, int tyep);
int btrfs_add_ordered_sum(struct inode *inode,