@@ -341,7 +341,7 @@ static inline void btrfs_inode_resume_unlocked_dio(struct btrfs_inode *inode)
#define CSUM_FORMAT_VALUE(size, bytes) size, bytes
static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode,
- u64 logical_start, u32 csum, u32 csum_expected, int mirror_num)
+ u64 logical_start, u8 *csum, u8 *csum_expected, int mirror_num)
{
struct btrfs_root *root = inode->root;
struct btrfs_super_block *sb = root->fs_info->super_copy;
@@ -352,15 +352,15 @@ static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode,
btrfs_warn_rl(root->fs_info,
"csum failed root %lld ino %lld off %llu csum " CSUM_FORMAT " expected csum " CSUM_FORMAT " mirror %d",
root->root_key.objectid, btrfs_ino(inode),
- logical_start, CSUM_FORMAT_VALUE(csum_size, &csum),
- CSUM_FORMAT_VALUE(csum_size, &csum_expected),
+ logical_start, CSUM_FORMAT_VALUE(csum_size, csum),
+ CSUM_FORMAT_VALUE(csum_size, csum_expected),
mirror_num);
else
btrfs_warn_rl(root->fs_info,
"csum failed root %llu ino %llu off %llu csum " CSUM_FORMAT " expected csum " CSUM_FORMAT " mirror %d",
root->root_key.objectid, btrfs_ino(inode),
- logical_start, CSUM_FORMAT_VALUE(csum_size, &csum),
- CSUM_FORMAT_VALUE(csum_size, &csum_expected),
+ logical_start, CSUM_FORMAT_VALUE(csum_size, csum),
+ CSUM_FORMAT_VALUE(csum_size, csum_expected),
mirror_num);
}
@@ -86,7 +86,7 @@ static int check_compressed_csum(struct btrfs_inode *inode,
if (memcmp(&csum, cb_sum, csum_size)) {
btrfs_print_data_csum_error(inode, disk_start,
- *(u32 *)csum, *(u32 *)cb_sum,
+ csum, cb_sum,
cb->mirror_num);
ret = -EIO;
goto fail;
@@ -3226,8 +3226,8 @@ static int __readpage_endio_check(struct inode *inode,
kunmap_atomic(kaddr);
return 0;
zeroit:
- btrfs_print_data_csum_error(BTRFS_I(inode), start, *(u32 *)csum,
- *(u32 *)csum_expected, io_bio->mirror_num);
+ btrfs_print_data_csum_error(BTRFS_I(inode), start, csum, csum_expected,
+ io_bio->mirror_num);
memset(kaddr + pgoff, 1, len);
flush_dcache_page(page);
kunmap_atomic(kaddr);