Skip to content

Give the app space to grow in internal KVStore default configuration #9156

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

Closed

Conversation

davidsaada
Copy link
Contributor

@davidsaada davidsaada commented Dec 19, 2018

Description

Prior to this change, the space left for the internal TDBStore (when working in the default internal configuration) was allocated from the sector following the end of the application until the end of flash. While this worked, it was problematic if the application would have crossed the sector boundary after an update. This PR leaves the application a couple of sectors to grow at the expense of the allocated storage (if they are available, which is the likely case).

This PR is defined as a breaking change, even if not a typical one: Boards that use the default internal configuration will lose the storage content after the upgrade (as the internal storage start will move forwards). Two boards will be affected: K66F and FUTURE_SEQUANA_M0_PSA. Non default configurations won't be harmed.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[x] Breaking change

@0xc0170 0xc0170 requested a review from a team December 19, 2018 13:42
@davidsaada davidsaada force-pushed the david_kvstore_int_config_size branch from e0907d8 to 731137e Compare December 20, 2018 12:17
@davidsaada
Copy link
Contributor Author

Rebased. No longer depending on anything.

@cmonr
Copy link
Contributor

cmonr commented Dec 20, 2018

@davidsaada Thank you for the description on why this would be considered a breaking change.

Is it possible that maaybe the default configurations themselves should also be changed/updated?

Fyi @ARMmbed/team-nxp @lrusinowicz

@davidsaada
Copy link
Contributor Author

@cmonr Default configurations by nature only include a minimal set of parameters, allowing the code to calculate the storage parameters automatically. The thing that was changed here was the way it's calculated in the internal flash case. Therefore, it seems that we don't need to change anything else. I also guess that many users would choose to tweak the storage parameters (start address, size etc.), which won't be affected by this change.

@davidsaada davidsaada force-pushed the david_kvstore_int_config_size branch from 731137e to 1ca5356 Compare January 6, 2019 09:36
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 7, 2019

Updated, needs reviewers !

@davidsaada
Copy link
Contributor Author

Closing this PR as apparently its code was added to #9237 (thought it had depended on this PR, appears that code was copied there).

@davidsaada davidsaada closed this Jan 7, 2019
@davidsaada davidsaada deleted the david_kvstore_int_config_size branch January 14, 2019 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants