btrfs: pre-load data checksum for reads in btrfs_submit_bio
authorChristoph Hellwig <hch@lst.de>
Sat, 21 Jan 2023 06:50:05 +0000 (07:50 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 15 Feb 2023 18:38:51 +0000 (19:38 +0100)
commit1c2b3ee3b0ec4bc971e23fe18d4c92333a6ad18a
treed4c86e0cfc3f6243968b8a79760f8c7390cff852
parent7276aa7d38255b40e578267c3634ebc05f5d5236
btrfs: pre-load data checksum for reads in btrfs_submit_bio

Instead of calling btrfs_lookup_bio_sums in every caller of
btrfs_submit_bio that reads data, do the call once in btrfs_submit_bio.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/bio.c
fs/btrfs/compression.c
fs/btrfs/inode.c