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

fix(bmap): reset internal state before writing #331

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

fmoessbauer
Copy link
Member

Before writing a new image file, we need to reset the internal state of the bmap writing algorithm. Otherwise subsequent writes do not start with a clean state. While fixing this, we also shink the state by making the number of written blocks a local variable (it can be trivially computed from the bytes written and the blocksize).

Hopefully that's the last fix for the bmap algorithm. Unfortunately all that is not easy to test, because many of the issues only show up on big and more complex images.

Before writing a new image file, we need to reset the internal state of
the bmap writing algorithm. Otherwise subsequent writes do not start
with a clean state. While fixing this, we also shrink the state
by making the number of written blocks a local variable (it can be
trivially computed from the bytes written and the blocksize).

Signed-off-by: Felix Moessbauer <[email protected]>
@chombourger chombourger merged commit b8e6e0a into siemens:master Sep 13, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants