sys/vfs/hammer: Add error messages for crc test failure
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 25 Sep 2015 17:04:37 +0000 (02:04 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 10 Oct 2015 12:38:13 +0000 (21:38 +0900)
commitbabd2e48fa1809dd684239b1113915cd37c044f8
tree4436624147d3d1db64304c347e514d3c25bf3414
parent586b3d2947ff8492a7f8bc7db8aaaba0d81c6aba
sys/vfs/hammer: Add error messages for crc test failure

Add crc error messages based on the existing error message
in hammer_btree_extract(). The one in hammer_mirror.c is
a part of #if0'd function.

Reported-by: profmakx
Suggested-by: dillon
23:27 (tkusumi) too many error = EIO;  but possibly bad crc ?
23:28 (tkusumi) if bad crc is the case turning on hammer_debug_critical leads to Debugger("CRC FAILED: B-TREE NODE");
23:40 (dillon) it's likely a CRC failure, though I think it should print those out on the console too
23:54 (tkusumi) some bad crc are missing  "CRC DATA @ %016llx/%d FAILED\n"
23:59 (dillon) those could be added for clarity.  Almost universally EIO from hammer means a bad CRC and not an actual disk read error.
23:59 (dillon) USB-connected hard drives seem to get these.  I've never gotten a bad CRC from a SATA-connected HDD via the AHCI driver.
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c