btrfs: Better csum error message for data csum mismatch
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Thu, 9 Feb 2017 02:45:06 +0000 (10:45 +0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 17 Feb 2017 11:03:48 +0000 (12:03 +0100)
commit6f6b643e44ef79cbd85e69800a06326805829aa8
tree7d04cfdabebaa9da49fc5f36c83024e7d882fbb7
parentfe01aa65385c226d822013b90608b67c485f8dc6
btrfs: Better csum error message for data csum mismatch

The original csum error message only outputs inode number, offset, check
sum and expected check sum.

However no root objectid is outputted, which sometimes makes debugging
quite painful under multi-subvolume case (including relocation).

Also the checksum output is decimal, which seldom makes sense for
users/developers and is hard to read in most time.

This patch will add root objectid, which will be %lld for rootid larger
than LAST_FREE_OBJECTID, and hex csum output for better readability.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/compression.c
fs/btrfs/inode.c