Wear level vfs corrupt on reboot
Posted: Mon Oct 29, 2018 4:02 am
I’m using esp-idf v3.1 and master.
When rebooting the esp32 soon after a fat/vfs/wearlevel write I find that file contents are corrupt on next boot.
I am using 512b blocks and safety (not performance mode)
There is no corruption if I allow wear level commands to finish (debug level logs still streaming out). Which would indicate that fat/vfs/wl fclose() calls are not only non-atomic, but destructive if not finished.
Does anyone know if this is a fat/vfs problem? Or a bug in wear level that doesn’t journal/replay correcly?
Not asking for a fix. Just asking if anyone knows the official current state of robustness.
When rebooting the esp32 soon after a fat/vfs/wearlevel write I find that file contents are corrupt on next boot.
I am using 512b blocks and safety (not performance mode)
There is no corruption if I allow wear level commands to finish (debug level logs still streaming out). Which would indicate that fat/vfs/wl fclose() calls are not only non-atomic, but destructive if not finished.
Does anyone know if this is a fat/vfs problem? Or a bug in wear level that doesn’t journal/replay correcly?
Not asking for a fix. Just asking if anyone knows the official current state of robustness.