On 2016-05-13 12:28, Goffredo Baroncelli wrote:
On 2016-05-11 21:26, Austin S. Hemmelgarn wrote:
(although it can't tell the difference between a corrupted checksum and a corrupted block of data).
I don't think so. The data checksums are stored in metadata blocks, and as metadata block, these have their checksums. So btrfs know if the checksum is correct or none, despite the fact that the data is correct or none. Of course if the checksum is wrong, btrfs can't tell if the data is correct.
The only exception should be the inline data: in this case the data is stored in the metadata block, and this block is protected by only one checksum.
I know that I am pedantic :_) but after reading your comment I looked at the btrfs data structure to refresh my memory, so I want to share these information.
It is fully possible for the block of data to be good and the checksum
to be bad, it's just ridiculously unlikely. I've actually had this
happen before at least twice (I have really bad luck when it comes disk
corruption).
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html