Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'for-5.6-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fix from David Sterba:
"One fixup for DIO when in use with the new checksums, a missed case
where the checksum size was still assuming u32"

* tag 'for-5.6-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
btrfs: fix RAID direct I/O reads with alternate csums

+3 -1
+3 -1
fs/btrfs/inode.c
··· 7783 7783 { 7784 7784 struct btrfs_io_bio *io_bio = btrfs_io_bio(bio); 7785 7785 struct btrfs_io_bio *orig_io_bio = btrfs_io_bio(dip->orig_bio); 7786 + u16 csum_size; 7786 7787 blk_status_t ret; 7787 7788 7788 7789 /* ··· 7803 7802 7804 7803 file_offset -= dip->logical_offset; 7805 7804 file_offset >>= inode->i_sb->s_blocksize_bits; 7806 - io_bio->csum = (u8 *)(((u32 *)orig_io_bio->csum) + file_offset); 7805 + csum_size = btrfs_super_csum_size(btrfs_sb(inode->i_sb)->super_copy); 7806 + io_bio->csum = orig_io_bio->csum + csum_size * file_offset; 7807 7807 7808 7808 return 0; 7809 7809 }