settings: doc: Update the backend documentation
This commit updates the settings backend documentation to clearly state that it cannot provide old entities before the final one. Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
parent
687a02a02d
commit
bb9c453777
|
@ -94,13 +94,16 @@ Loading data from persisted storage
|
|||
|
||||
A call to ``settings_load()`` uses an ``h_set`` implementation
|
||||
to load settings data from storage to volatile memory.
|
||||
For both FCB and filesystem back-end the most
|
||||
recent key values are guaranteed by traversing all stored content
|
||||
and (potentially) overwriting older key values with newer ones.
|
||||
After all data is loaded, the ``h_commit`` handler is issued,
|
||||
signalling the application that the settings were successfully
|
||||
retrieved.
|
||||
|
||||
Technically FCB and filesystem backends may store some history of the entities.
|
||||
This means that the newest data entity is stored after any
|
||||
older existing data entities.
|
||||
Starting with Zephyr 2.1, the back-end must filter out all old entities and
|
||||
call the callback with only the newest entity.
|
||||
|
||||
Storing data to persistent storage
|
||||
**********************************
|
||||
|
||||
|
|
|
@ -390,6 +390,12 @@ struct settings_store_itf {
|
|||
* Parameters:
|
||||
* - cs - Corresponding backend handler node,
|
||||
* - arg - Structure that holds additional data for data loading.
|
||||
*
|
||||
* @note
|
||||
* Backend is expected not to provide duplicates of the entities.
|
||||
* It means that if the backend does not contain any functionality to
|
||||
* really delete old keys, it has to filter out old entities and call
|
||||
* load callback only on the final entity.
|
||||
*/
|
||||
|
||||
int (*csi_save_start)(struct settings_store *cs);
|
||||
|
|
Loading…
Reference in a new issue