aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ordered-data.h
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2013-04-05 03:20:56 -0400
committerJosef Bacik <jbacik@fusionio.com>2013-05-06 15:54:35 -0400
commite4100d987b2437596ebcf11809022b79507f3db1 (patch)
tree2e1b987afa41149ef621581f1eb125c027453f74 /fs/btrfs/ordered-data.h
parent09a2a8f96e3009273bed1833b3f210e2c68728a5 (diff)
Btrfs: improve the performance of the csums lookup
It is very likely that there are several blocks in bio, it is very inefficient if we get their csums one by one. This patch improves this problem by getting the csums in batch. According to the result of the following test, the execute time of __btrfs_lookup_bio_sums() is down by ~28%(300us -> 217us). # dd if=<mnt>/file of=/dev/null bs=1M count=1024 Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.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 8eadfe406cdd..58b0e3b0ebad 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -196,7 +196,8 @@ struct btrfs_ordered_extent *btrfs_lookup_ordered_range(struct inode *inode,
196 u64 len); 196 u64 len);
197int btrfs_ordered_update_i_size(struct inode *inode, u64 offset, 197int btrfs_ordered_update_i_size(struct inode *inode, u64 offset,
198 struct btrfs_ordered_extent *ordered); 198 struct btrfs_ordered_extent *ordered);
199int btrfs_find_ordered_sum(struct inode *inode, u64 offset, u64 disk_bytenr, u32 *sum); 199int btrfs_find_ordered_sum(struct inode *inode, u64 offset, u64 disk_bytenr,
200 u32 *sum, int len);
200int btrfs_run_ordered_operations(struct btrfs_trans_handle *trans, 201int btrfs_run_ordered_operations(struct btrfs_trans_handle *trans,
201 struct btrfs_root *root, int wait); 202 struct btrfs_root *root, int wait);
202void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, 203void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans,