Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage/stream_flash: Document write flush as mandatory #68660

Merged

Conversation

de-nordic
Copy link
Collaborator

There is no need to make this optional just inform user that this has to be called to complete write of buffers. The commit also adds info that there should be no more write attempts done with use of "flushed", as it may return write errors anyway.

@de-nordic de-nordic marked this pull request as ready for review February 27, 2024 11:36
@de-nordic de-nordic requested a review from kartben February 27, 2024 11:36
@zephyrbot zephyrbot added the area: Storage Storage subsystem label Feb 27, 2024
Comment on lines 109 to 113
* A write with the @p flush set to true has to be issued as the last
* write request for a given context, as it concludes write of a stream;
* there must not be issued any more write requests for given context,
* unless it is re-initialized, and such write attempts may result in the
* function returning error.
Copy link
Collaborator

Choose a reason for hiding this comment

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

this seems redundant with L102-103. I would completely remove this section and instead only update L102-103 (also maybe make it a @warning to make it stand out more?) to add the extra explanation regarding the expected behavior after a flush write. Maybe

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kartben Does this look better now?

@de-nordic de-nordic force-pushed the stream_flash_write_doc branch 2 times, most recently from ff84c59 to 06cc2e8 Compare April 24, 2024 15:43
@de-nordic de-nordic requested a review from kartben April 24, 2024 15:43
Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

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

Yes! Just spotted a small typo + other minor nit. Thanks!

include/zephyr/storage/stream_flash.h Outdated Show resolved Hide resolved
include/zephyr/storage/stream_flash.h Outdated Show resolved Hide resolved
include/zephyr/storage/stream_flash.h Outdated Show resolved Hide resolved
There is no need to make this optional just inform user that
this has to be called to complete write of buffers.
The commit also adds info that there should be no more write
attempts done with use of "flushed", as it may return write
errors anyway.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
@de-nordic de-nordic force-pushed the stream_flash_write_doc branch from cd76d49 to e1056c9 Compare April 24, 2024 16:53
@de-nordic
Copy link
Collaborator Author

Yes! Just spotted a small typo + other minor nit. Thanks!

Sorry, should have run check before push.

@de-nordic de-nordic requested a review from kartben April 24, 2024 16:54
@kartben kartben requested review from gmarull and Laczen April 24, 2024 18:42
@fabiobaltieri fabiobaltieri merged commit 68be171 into zephyrproject-rtos:main Apr 25, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Storage Storage subsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants