-
Notifications
You must be signed in to change notification settings - Fork 3
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
Remove the dat
folders to save littlefs space
#39
Conversation
13b13a2
to
4e06125
Compare
5b099dc
to
6827148
Compare
I made the migration and the removal of the dat folder optional, so this can be merged without staying a pain having to constantly rebase. |
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.
I feel like the use_raw
configuration option is leaking implementation details. And without context, it is not clear which setting is the “correct”/new one.
What do you think about just using a versioning system? That would make it easy to identify the correct setting, and the implementation details would stay in this crate. Potentially it could also be used to select the correct migration steps.
pub enum FilesystemLayout {
V0,
V1,
}
impl FilesystemLayout {
fn use_raw(&self) -> bool {
self != FilesystemLayout::V0
}
}
Cargo.toml
Outdated
@@ -20,12 +20,20 @@ serde-byte-array = "0.1.2" | |||
sha2 = { version = "0.10.6", default-features = false } | |||
subtle = { version = "2.4.1", default-features = false } | |||
trussed = { version = "0.1.0", features = ["serde-extensions"] } | |||
littlefs2 = "0.4.0" | |||
admin-app = "0.1.0" |
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.
unneeded dependency?
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.
Right admin-app can dev-dependency
only.
I like that. Will do this. For se050 backend too. |
d9b0eb6
to
d9c02b9
Compare
d9c02b9
to
b792b18
Compare
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.
Thank you!
The changelog entry for PR trussed-dev#39 ended up in the 0.3.0 section instead of the section for unreleased changes.
The changelog entry for PR trussed-dev#39 ended up in the 0.3.0 section instead of the section for unreleased changes.
The changelog entry for PR trussed-dev#39 ended up in the 0.3.0 section instead of the section for unreleased changes.
This PR removes the
dat
folder used byClientFilestore
that wastes a lot of space on the filesystem.Depends on Nitrokey/trussed#34
This PR also adds a
migrate
function that allows moving from the previous layout to the new layout.The migrate function cannot by itself know if the migration has been done. I would probably have it done by the Admin App, through a "privilegded" syscall, since the admin app is loaded first and can keep track of whether the migration has already been done.