natevw / fatfs

Standalone FAT16/FAT32 filesystem implementation in JavaScript
47 stars 13 forks source link

General error recovery/handling behavior #3

Open natevw opened 10 years ago

natevw commented 10 years ago

When anything goes wrong, we basically just bubble it up the stack. But what state does this leave the on-disk structures? Or our in-memory structures vs. the on-disk ones?

When it made sense, I've usually taken care to do on-disk operations in the "safest" (i.e. most interruptible) order. But maybe not always, and there's also state like _fd.entry._size that could get mismatched.