-
Notifications
You must be signed in to change notification settings - Fork 3k
KVStore: Support external storage out of mbed-os tree #10355
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
Conversation
@ccli8, thank you for your changes. |
@davidsaada please review. Are there any docs that need to be updated? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK all in all. Just got one comment regarding the classification of the device as a flash one.
* | ||
* @returns true for flash type or false for non-flash type. | ||
*/ | ||
bool is_blockdevice_flash_type(BlockDevice *bd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for this function. One can call the BD's get_erase_value
method. A non flash device would return a -1 value, telling that that this block device is incapable of erasing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidsaada Yes. BD's get_erase_value method
can help check flash type or not. I've updated it and related config description.
To support block device out of mbed-os tree in KVStore, user needs to: 1. Configure blockdevice to "other". 2. Override get_other_blockdevice() to provide block device out of mbed-os tree.
8b885d3
to
63d9cde
Compare
@davidsaada could you approve now please if you are happy with the changes ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Thanks.
CI started |
Test run: FAILEDSummary: 2 of 11 test jobs failed Failed test jobs:
|
CI restarted (internal license server fault) |
@davidsaada |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Our KVStore documentation doesn't go deep as in specifying how to implement block devices. I think that adding a description in the release notes is the way to go. |
@ccli8 Set to 5.13 as functionality change (PR type should be fixed above). If that is correct, release notes section should be filled. |
@0xc0170 Changed PR type to Functionality change and added Release Notes section. |
Description
This PR tries to support external storage out of mbed-os tree in KVStore. To enable it, user needs to:
blockdevice
toother
.get_other_blockdevice()
to provide block device out of mbed-os tree.Pull request type
Release issue
#10300
Release Notes
Support external storage out of mbed-os tree in KVStore. To enable it, user needs to:
blockdevice
toother
.get_other_blockdevice()
to provide block device out of mbed-os tree.BlockDevice *get_other_blockdevice();