This test part of the RealDB project. See site at http://www.gillius.org/realdb/ Analysis of corrupted file generated in CorruptionTest-2008-07-11: Using an updated validate functionality, discovered that blocks 699, 700, and 701 failed the CRC check, so the 3 failed blocks are in order. 702 and on were clear, and 698 and earlier are OK. Interesting to note is that first four bytes of block 699 and 701 match the other blocks (all "written" blocks had the same random data with this version). I should check to see if smaller subblocks failed, by running the test again with a smaller block size, to have more detail on where corruption occurs. --------------- Testing in Windows with 256 byte block size: * One thing I noticed that is very different this time is that Windows appears to be caching the writes now when made 256 bytes at a time -- the write/clear operations go to 100% immediately, but then the close method on the file pauses. As far as I know I haven't changed any Windows settings; hypothesis: perhaps there is some heuristic whereby Windows attempts to not commit the write if you only modify part of a block, for reasons of performance -- for example if writing a single byte each time causes 512 bytes to be flashed on the hardware, this would decrease speed by 512 times and increase wear by the same, unless Windows buffered it. Evidence to counter this is if that were true, why does Windows not pause after I write 512, 4096, etc. bytes whenever its buffer is filled. * When I pull out the card after the 100% write but before I knew the hardware could have completed, Windows pops up a "delayed write error" when writing my file (it gives the file name) and says that the data has been lost. Validate results: Very interestingly, it shows all blocks as being good! Perhaps the writes were taking place in sectors not referenced by the FS, then Windows switches the FS to point to the new file when it's done, so I'm really looking at the old one? Future work: 1. Add feature to place current time in the blocks, so that I know when they were created.