aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorGravatar David Sterba <dsterba@suse.com> 2020-06-30 02:01:31 +0200
committerGravatar David Sterba <dsterba@suse.com> 2020-12-08 15:53:59 +0100
commit55fc29bed8ddb4c3848ecf8cf7133e34c946f223 (patch)
treec7174086f876963be22ca15e63e05560378d4518 /fs/btrfs/extent_io.c
parentbtrfs: precalculate checksums per leaf once (diff)
downloadlinux-55fc29bed8ddb4c3848ecf8cf7133e34c946f223.tar.gz
linux-55fc29bed8ddb4c3848ecf8cf7133e34c946f223.tar.bz2
linux-55fc29bed8ddb4c3848ecf8cf7133e34c946f223.zip
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 <johannes.thumshirn@wdc.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 1eeba31b551d..d699f5d9b710 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2689,7 +2689,7 @@ blk_status_t btrfs_submit_read_repair(struct inode *inode,
repair_bio->bi_private = failed_bio->bi_private;
if (failed_io_bio->csum) {
- const u16 csum_size = btrfs_super_csum_size(fs_info->super_copy);
+ const u16 csum_size = fs_info->csum_size;
repair_io_bio->csum = repair_io_bio->csum_inline;
memcpy(repair_io_bio->csum,