Skip to content

Conversation

@MirkoCovizzi
Copy link
Contributor

The bm_zms_clear function executes write operations under the hood that can be asynchronous.
The condition of termination for the operation is when the file system is set to uninitialized.
Adds a check for this condition before terminating the sample.

@MirkoCovizzi MirkoCovizzi self-assigned this Nov 18, 2025
@MirkoCovizzi MirkoCovizzi requested a review from a team as a code owner November 18, 2025 12:44
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 18, 2025
@MirkoCovizzi MirkoCovizzi removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 18, 2025
@github-actions
Copy link

You can find the documentation preview for this PR here.

@MirkoCovizzi MirkoCovizzi requested a review from a team as a code owner November 18, 2025 12:53
@github-actions github-actions bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval. labels Nov 18, 2025
@MirkoCovizzi MirkoCovizzi removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 18, 2025
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 18, 2025
@MirkoCovizzi MirkoCovizzi removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 18, 2025
@eivindj-nordic eivindj-nordic added this to the v1.0.0 milestone Nov 19, 2025
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 19, 2025
@MirkoCovizzi MirkoCovizzi changed the title samples: peripherals: bm_zms: add wait after clear samples: subsys: fs: bm_zms: add wait after clear Nov 19, 2025
Clearing the storage system
===========================

The :c:func:`bm_zms_clear` function must be called to clear the storage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The :c:func:`bm_zms_clear` function must be called to clear the storage.
Call the :c:func:`bm_zms_clear` function to clear the storage.

The :c:func:`bm_zms_clear` function must be called to clear the storage.

When this uninitialization is successful, the library sets the flag :c:member:`bm_zms_fs.init_flags.initialized` to false.
For asynchronous storage backends, you must wait for the uninitialization to finish before re-initializing the storage system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For asynchronous storage backends, you must wait for the uninitialization to finish before re-initializing the storage system.
For asynchronous storage backends, you must wait for the uninitialization to finish before reinitializing the storage system.

Clearing the storage system
===========================

Call the :c:func:`bm_zms_clear` function to clear the storage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps state explicitly here that it uinintializes the zms instance.

Suggested change
Call the :c:func:`bm_zms_clear` function to clear the storage.
Call the :c:func:`bm_zms_clear` function to clear the storage and uninitialize the ZMS instance.

@sonarqubecloud
Copy link

The `bm_zms_clear` function executes write operations
under the hood that can be asynchronous.
The condition of termination for the operation is when
the file system is set to uninitialized.
Adds a check for this condition before terminating
the sample.

Signed-off-by: Mirko Covizzi <[email protected]>
Adds section that explains how to handle the storage system
clear.

Signed-off-by: Mirko Covizzi <[email protected]>
@MirkoCovizzi MirkoCovizzi removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants