For the ESP_EEPROM library, if an ESP8266 loses power during a commit() operation, what is the state of the information stored in flash?
Presumably in the case where the entire sector is being erased, a power loss during erase most likely results in a garbage state that may be hard to detect.
My reading of the code is that the new data is written to the flash, then the bitmap index is updated. So, if the power is lost while the new data is being written, the index will still point to the previous valid data. If power is lost while writing the bitmap (index), that could result in a garbage index, making it impossible (or at least difficult) to tell where the last valid data is stored.
Is this a correct analysis?