nvs: NVS cache always rebuild on successful NVS initialization
During the NVS initialization, if gc had to be done, the NVS cache rebuild wasn't called. Signed-off-by: Julien D'Ascenzio <julien.dascenzio@paratronic.fr>
This commit is contained in:
parent
a003b725bb
commit
b7c2b3fc3a
1 changed files with 6 additions and 4 deletions
|
@ -887,11 +887,13 @@ static int nvs_startup(struct nvs_fs *fs)
|
||||||
fs->data_wra = fs->ate_wra & ADDR_SECT_MASK;
|
fs->data_wra = fs->ate_wra & ADDR_SECT_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NVS_LOOKUP_CACHE
|
|
||||||
rc = nvs_lookup_cache_rebuild(fs);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
|
#ifdef CONFIG_NVS_LOOKUP_CACHE
|
||||||
|
if (!rc) {
|
||||||
|
rc = nvs_lookup_cache_rebuild(fs);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* If the sector is empty add a gc done ate to avoid having insufficient
|
/* If the sector is empty add a gc done ate to avoid having insufficient
|
||||||
* space when doing gc.
|
* space when doing gc.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue