Commit 492c993
committed
[nrf fromlist] fs: nvs: Improve nvs_calc_free_space() result precision
The nvs_calc_free_space() function does not return 0 when the NVS
is considered full, because some special ATEs are not taken into account.
This commit takes into account the ATE that is reserved for deletion in
each sector, in addition of the 'GC done' ATE when present.
Upstream PR: zephyrproject-rtos/zephyr#74900
Signed-off-by: Adrien Ricciardi <[email protected]>1 parent 2c2f60d commit 492c993
1 file changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
1358 | | - | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
1359 | 1363 | | |
1360 | 1364 | | |
1361 | 1365 | | |
| |||
1379 | 1383 | | |
1380 | 1384 | | |
1381 | 1385 | | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1387 | 1397 | | |
1388 | 1398 | | |
1389 | 1399 | | |
| |||
0 commit comments