fs/nvs: fix startup for 2-sectors configuration
This patch fixes following bug:
After first GC operation the 1st sector had become scratch
and the 2nd sector had became write sector. After that NVS
was initialize (via reboot) again - it recognized the 1st
sector as write sector and 2nd as undone GC destination sector,
therefore it cleared 2nd sector and re-run GC, which implied data loss.
Signed-off-by:
Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Loading
Please sign in to comment