diff options
Diffstat (limited to 'fs/ocfs2/blockcheck.c')
-rw-r--r-- | fs/ocfs2/blockcheck.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ocfs2/blockcheck.c b/fs/ocfs2/blockcheck.c index 2bf3d7f61aec..2ce6ae5e4b8c 100644 --- a/fs/ocfs2/blockcheck.c +++ b/fs/ocfs2/blockcheck.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
25 | #include <asm/byteorder.h> | 25 | #include <asm/byteorder.h> |
26 | 26 | ||
27 | #include <cluster/masklog.h> | ||
28 | |||
27 | #include "ocfs2.h" | 29 | #include "ocfs2.h" |
28 | 30 | ||
29 | #include "blockcheck.h" | 31 | #include "blockcheck.h" |
@@ -292,6 +294,10 @@ int ocfs2_block_check_validate(void *data, size_t blocksize, | |||
292 | if (crc == check.bc_crc32e) | 294 | if (crc == check.bc_crc32e) |
293 | goto out; | 295 | goto out; |
294 | 296 | ||
297 | mlog(ML_ERROR, | ||
298 | "CRC32 failed: stored: %u, computed %u. Applying ECC.\n", | ||
299 | (unsigned int)check.bc_crc32e, (unsigned int)crc); | ||
300 | |||
295 | /* Ok, try ECC fixups */ | 301 | /* Ok, try ECC fixups */ |
296 | ecc = ocfs2_hamming_encode_block(data, blocksize); | 302 | ecc = ocfs2_hamming_encode_block(data, blocksize); |
297 | ocfs2_hamming_fix_block(data, blocksize, ecc ^ check.bc_ecc); | 303 | ocfs2_hamming_fix_block(data, blocksize, ecc ^ check.bc_ecc); |
@@ -301,6 +307,9 @@ int ocfs2_block_check_validate(void *data, size_t blocksize, | |||
301 | if (crc == check.bc_crc32e) | 307 | if (crc == check.bc_crc32e) |
302 | goto out; | 308 | goto out; |
303 | 309 | ||
310 | mlog(ML_ERROR, "Fixed CRC32 failed: stored: %u, computed %u\n", | ||
311 | (unsigned int)check.bc_crc32e, (unsigned int)crc); | ||
312 | |||
304 | rc = -EIO; | 313 | rc = -EIO; |
305 | 314 | ||
306 | out: | 315 | out: |