How about an idea I proposed a while back, 'integrity loopback'?
A loopback device which writes a CRC with each block and checks
the CRC when read back.
So if you have a flaky DMA controller, bad cables, etc you will
know instantly. It would at least help catch the 'silent
corruption' cases.
It still doesn't help with block-reordering, the fs needs some way to
communication write-barriers or relative block write ordering to the
lower-levels.
To implement the device, I would hack loopback to take no only the
loopback file, but also another 'checksum' file of 160-bits or
whatever for each 4096 (or whatever) block. This file might initially
be of zero-length, in which case the bind is responsible for
checksumming the blocks and writing the checksums out on attach.
I say 160-bits (or whatever) so you can use something like SHA1 for
the checksums, this way you can use a small application to resync the
entire fs at the block level over a network without having to read
every block (ie. you compared checksums and then xmit the blocks).
The latter is something I needed a while ago.
--cw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/