Only the first byte of the wanted csum is printed:

checksum verify failed on 65536 found DA97CF61 wanted 6B
checksum verify failed on 65536 found DA97CF61 wanted 6BC3870D

Also add leading zeros to the format.

Signed-off-by: David Sterba <dste...@suse.cz>
---
 disk-io.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/disk-io.c b/disk-io.c
index b001e35..21b410d 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -89,9 +89,9 @@ int csum_tree_block_size(struct extent_buffer *buf, u16 
csum_size,
 
        if (verify) {
                if (memcmp_extent_buffer(buf, result, 0, csum_size)) {
-                       printk("checksum verify failed on %llu found %X "
-                              "wanted %X\n", (unsigned long long)buf->start,
-                              *((int *)result), *((char *)buf->data));
+                       printk("checksum verify failed on %llu found %08X "
+                              "wanted %08X\n", (unsigned long long)buf->start,
+                              *((u32 *)result), *((u32*)(char *)buf->data));
                        free(result);
                        return 1;
                }
-- 
1.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to