mbed-os/features/storage/kvstore
Seppo Takalo 8f77de6453 TDBStore safety check: Erase if there is valid keys on the free space.
In case our are contains data from previous reset() or reset_area(),
we might  end up in the situation  where  free space contains valid
key headers,  but we have not erased that area  yet. This can cause
failures if the deinit() and init()  because  new scan of that area
would continue  as long as keys  are found. This causes keys on the
not-yet-erased  area to be included in the new instance of TDBStore.

To prevent this failure,  check  after each key-write that our free
space does not contain valid  key headers.  Also make sure  that we
erase one program unit sector over the master record.  If we erased
just the master record,first key might is still there, causing next
init() to find it.  Extend erase area by  one program unit, so that
build_ram_table() won't find any keys.
2019-11-28 10:37:07 +02:00
..
conf LPC55S69_NS: Sets default TDBStore size to 32kB 2019-11-21 11:28:59 +02:00
direct_access_devicekey Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
filesystemstore Add storage related files to baseline unittest. 2019-11-04 16:12:36 +02:00
global_api Add storage related files to baseline unittest. 2019-11-04 16:12:36 +02:00
include Moving KVStore to include sub folder For TFM support 2019-01-15 10:54:21 +02:00
kv_map Add empty unittest to generate zero baseline for untested files. 2019-11-04 16:12:36 +02:00
securestore Merge pull request #11810 from kyle-cypress/pr/securestore-struct-init 2019-11-07 09:20:43 +01:00
tdbstore TDBStore safety check: Erase if there is valid keys on the free space. 2019-11-28 10:37:07 +02:00