diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-08-03 22:49:19 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-08-28 22:53:30 +0200 |
commit | c329861da40623cd838b8c9ee31a850242fd88cf (patch) | |
tree | d395b6dae57c00c25f1b890db1f39871575a7013 /fs/btrfs/file-item.c | |
parent | Btrfs: do not strdup non existent strings (diff) | |
download | linux-c329861da40623cd838b8c9ee31a850242fd88cf.tar.xz linux-c329861da40623cd838b8c9ee31a850242fd88cf.zip |
Btrfs: don't allocate a seperate csums array for direct reads
We've been allocating a big array for csums instead of storing them in the
io_tree like we do for buffered reads because previously we were locking the
entire range, so we didn't have an extent state for each sector of the
range. But now that we do the range locking as we map the buffers we can
limit the mapping lenght to sectorsize and use the private part of the
io_tree for our csums. This allows us to avoid an extra memory allocation
for direct reads which could incur latency. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index b45b9de0c21d..857d93cd01dc 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -272,9 +272,9 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode, } int btrfs_lookup_bio_sums_dio(struct btrfs_root *root, struct inode *inode, - struct bio *bio, u64 offset, u32 *dst) + struct bio *bio, u64 offset) { - return __btrfs_lookup_bio_sums(root, inode, bio, offset, dst, 1); + return __btrfs_lookup_bio_sums(root, inode, bio, offset, NULL, 1); } int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end, |