From 55fc29bed8ddb4c3848ecf8cf7133e34c946f223 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 30 Jun 2020 02:01:31 +0200 Subject: btrfs: use cached value of fs_info::csum_size everywhere btrfs_get_16 shows up in the system performance profiles (helper to read 16bit values from on-disk structures). This is partially because of the checksum size that's frequently read along with data reads/writes, other u16 uses are from item size or directory entries. Replace all calls to btrfs_super_csum_size by the cached value from fs_info. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: David Sterba --- fs/btrfs/ordered-data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/btrfs/ordered-data.c') diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 78c1f28f3bb6..6a63fb141f23 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -868,7 +868,7 @@ int btrfs_find_ordered_sum(struct btrfs_inode *inode, u64 offset, struct btrfs_ordered_inode_tree *tree = &inode->ordered_tree; unsigned long num_sectors; unsigned long i; - const u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); + const u16 csum_size = fs_info->csum_size; int index = 0; ordered = btrfs_lookup_ordered_extent(inode, offset); -- cgit v1.2.3