WinCE 6 R3 TexFAT Bootblock Corruption - use of the backup bootblock? RRS feed

  • Question

  • Hello,

    We are evaluating the use of the Transaction Safe exFAT filesystem on a NAND-Flash Chip.

    We have included the necessary Catalog Items and Registry Keys. We have verified (by logging the Sector Reads and Writes with a modified FAL), that the filesystem uses both of the FAT tables and Allocation Bitmaps when writing. Also, the Volume Boot Record is updated according to the current active FAT (Volume Flags).

    We created an autostart application, which writes to a file in the TexFAT filesystem. We simulate powerfails by switching the whole system on and off in an automated way.

    We know that the Transaction Safe exFAT filesystem can not prevent data loss, but should at least try to maintain a consistent state of the filesystem, right?

    This seems to work ok until the Volume Boot Record gets corrupted because of a powerfail while writing to it. In this case, the whole filesystem fails to mount on the next start. On our system, this happens after about 300 to 500 "powerfail cycles". We could reproduce it at least 15 times so far (100% of our tests). After (re)formatting the flash, everything works ok again, but of course all the directory structure and data is lost.

    We are curious about the use of the second Volume Boot Record, which should be a backup-copy of the main Volume Boot Record. We thought the backup copy would be used by the TexFAT implementation in the case that the main Volume Boot Record is corrupted. However, this does not seem to be the case.

    We then tried to "manually repair" the man VBR by copying the second VBR over the main VBR (by opening the 'DSK:'-device and copying the corresponding sectors). After doing this, the system was able to mount the filesystem again. Also, all the directory structure and files were still on it.

    The question is: why does the implementation of the TexFAT filesystem in WinCE not use the backup VBR in case of a corrupt main VBR? Is there a way to activate this behavior (e.g. a registry setting?). Or is there a reason for not doing it?

    Thanks in advance.



    Thursday, October 7, 2010 6:36 AM