-
Notifications
You must be signed in to change notification settings - Fork 54
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
Unable to recover from CorruptedFileSystem
unless storage
is Clone
#54
Comments
I added |
Yeah, i think that would be a great solution!
I did this in my previous attempt (OP), because with those changes, i now effectively had implemented
This is the actual issue i am facing, and passing storage by reference is more of a workaround. Returning |
The current implementation makes it impossible to recover from a
CorruptedFileSystem
error by formatting filesystem, unless thestorage
argument ofFilesystem::new()
implementsClone
or similar.It is also impossible to fix it by implementing
Read
,Write
& friends for&mut storage
due to the currentIntoStorage
that will consume byself
...Another related issue is that
storage
is not returned inunmount
, resulting in it being lost forever in e.g. an embedded system wherestorage
directly correlates to a peripheral.I have played around with one possible solution, that would be able to fix all of the above issues, but i am not sure if it is a direction you want to go? MathiasKoch@6ed236a
If so, i would love to finish it up and make a PR.
Currently it is missing the return of
storage
on unmounts, anInto
implementation forStdIoWrapper
and fixing the examples & tests.The text was updated successfully, but these errors were encountered: