]> granicus.if.org Git - esp-idf/commit
nvs_flash: Fix nvs_set_blob hang when partition is near to FULL
authorSagar Bijwe <sagar@espressif.com>
Tue, 21 Aug 2018 11:36:17 +0000 (17:06 +0530)
committerSagar Bijwe <sagar@espressif.com>
Tue, 21 Aug 2018 11:38:46 +0000 (17:08 +0530)
commit911f96ad2173e6efdabd83199160bff708d0ce8d
tree6bf12d72eb6cde6219724188fb1c8dbf2c6bf1a2
parenta6a9484084e0bd02f0fdc4fa2e62a1f810aa167f
nvs_flash: Fix nvs_set_blob hang when partition is near to FULL

Marking a page full does not skip it from page selection process and the
same page might get returned if there is no other page with more unused
entries. Added a check for the same while storing blobs.

Fixes: https://github.com/espressif/esp-idf/issues/2313
components/nvs_flash/src/nvs_storage.cpp
components/nvs_flash/test_nvs_host/test_nvs.cpp