mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
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>
This commit is contained in:
parent
1e25a2e3ca
commit
10fe6ca80d
3 changed files with 19 additions and 12 deletions
|
@ -61,7 +61,7 @@ struct compressed_bio {
|
|||
* the start of a variable length array of checksums only
|
||||
* used by reads
|
||||
*/
|
||||
u32 sums;
|
||||
u8 sums[];
|
||||
};
|
||||
|
||||
static inline unsigned int btrfs_compress_type(unsigned int type_level)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue