card-io-ecg / norfs

Wear-leveling filesystem implementation for embedded Rust
Apache License 2.0
6 stars 0 forks source link

Make FS scan more robust #6

Open bugadani opened 1 year ago

bugadani commented 1 year ago

This PR changes incorrect object handling so we won't immediately fail when we encounter an incorrect object. Incorrect objects may be present due to power loss, as the result of the following:

Additionally, we may have incorrect block headers, in case power cuts out while erasing a block. We should immediately reformat these blocks.

Related to #2 - I still don't know why the corruption happened (firmware locked up while writing a file, most likely), but we shouldn't completely trash the FS with this PR.