btrfs: don't assume compressed_bio sums to be 4 bytes
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 22 May 2019 08:19:02 +0000 (10:19 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:35:01 +0000 (13:35 +0200)
commit10fe6ca80d9d25eca9fd6d98eccf6c795532fe96
treeed36a8a59ff0e86913f9b9492d5a743e769f3404
parent1e25a2e3ca0dab0ed1030570e95d98af47113eae
btrfs: don't assume compressed_bio sums to be 4 bytes

BTRFS has the implicit assumption that a checksum in compressed_bio is 4
bytes. While this is true for CRC32C, it is not for any other checksum.

Change the data type to be a byte array and adjust loop index calculation
accordingly.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/compression.h
fs/btrfs/file-item.c