Recently I had a SD card destroyed ( software wise ) on me. Basically as well as I can figure it out, all the metadata was wiped (ext4 card). This happened when I was working and suddenly had to write a check. I yanked the card I was working on, put in my "accounting card" wrote the checks, scanned them. pulled the "accounting card" put in the working card. As I start to work I see that my working card is labeled the same as my "accounting card". What I figure is that I forgot to unmount ( or thought I did, but it failed ) the "accounting card" replaced it, a random call to sync then overwrote my working card's metadata.
This was a minor annoyance, but it got me to thinking about recovering data. If all the data about which sectors constitute a file is in the metadata. and the metadata is wiped then the file is gone. But if the file contains references to the blocks it uses then that file is not lost. This might not be practical on a hard drive though.
For the most part the use cases on an SD card are much different from the use cases of a hard drive. Where on the hard drive you are often modifying files, on an SD card you tend to read files, write entire files and delete entire files. On occasion you modify files, but more rarely then you do on regular HDs. At least that is my usage.
Also corruption modes of HD's and SD cards are different. HD's are corrupted when you have some sort of system crash, or when you have some sort of abrupt power off. SD cards are corrupted when you fail to unmount. If the file stores all it's own sector information, then it is less important if the metadata gets flushed.
So is there a filesystem for SD cards where recovery is virtually gauranteed, and has reasonable overall performance?