On Sat, Jul 23, 2016 at 10:32 PM, Tomasz Melcer <li...@exroot.org> wrote: > On 24.07.2016 04:16, Chris Murphy wrote: >> >> On Sat, Jul 23, 2016 at 8:03 PM, Tomasz Melcer <li...@exroot.org> wrote: >>> >>> How can I ask btrfs to recompute the checksum of a data block as it is >>> stored on the drive? >> >> >> Since btrfs-progs 3.17 'btrfs check --init-csum-tree' will create a >> whole new csum tree. > > > I can't make this command recalculate only checksum of that single file?
The likelihood of the data block being wrong is very high. If the csum itself were wrong, the csum of the leaf it's stored in would catch it, except in the narrow edge case where the csum was computed wrong in memory, and then put into the leaf which is then checksummed correctly, i.e. the leaf csum says the leaf is good but it contains a bad csum for just one block. Possible but, pretty rare if there isn't a problem causing in-memory corruption. You'd see a lot more errors. A few bad sectors are exactly what this most likely is. The drive ECC is probably failing to correct the problem, but thinks it's right which why there's no read error from the drive. -- Chris Murphy -- 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