I had considered some type of redundancy in my design, and my notepad has 2 possibilities scrawled on it...
1) The TOC is duplicated, and the backup copy is written first. This would allow a "Repair FS option.
2) I run a trickle charged battery, and the system has to unlatch a relay to safely shut down.
Option 2 does not consider FS corruption by the OS, but since I am coding in my native language of assembly, there simply will not be any bugs in the code. If I wanted buggy code, I would let a compiler do the work!
Yeah... I will probably go with the first option and just mirror the TOC.
I also have that PC link option in CrossTalk to make binary images of the mass storage.
Brad
Writing a filesystem from scratch is a bit of a task!
Writing a filesystem that is robust and efficient is even more of a task. The robust part is particularly a challenge, as the FS has to be able to behave in a reasonable fashion following a system crash and subsequent restart. That requirement is why journaling filesystems were invented.