-
Notifications
You must be signed in to change notification settings - Fork 982
Storage: Add block reset logic (from Incus) #14761
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8727cb8 to
437fa7f
Compare
f840584 to
650a3d7
Compare
simondeziel
reviewed
Jan 8, 2025
simondeziel
reviewed
Jan 9, 2025
8ed2311 to
69b14c6
Compare
This is a more comprehensive approach to storage reseting than what's currently present in clearDiskData as it now uses a set of markers to confirm that the device was correctly reset. It's also expanded to try a variety of different discarding options (from fastest to slowest). Suggested-by: Takero Funaki <[email protected]> Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit 82abb2a2aec6569594667e927f90b772dc2c4b28) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit 1a70e0cdc1de280b3a8ee2454889000f5a30b659) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit 23f3548da1f8e47f6c5ead8ef0099dfff1624367) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit 9766bfa2f82067b5f52a3f6c0f43fbbaf1547d3d) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
Signed-off-by: Thomas Parrott <[email protected]>
Signed-off-by: Thomas Parrott <[email protected]>
69b14c6 to
407732c
Compare
simondeziel
reviewed
Jan 10, 2025
…rBlock Avoid the scenario where the clearly wrong values are passed to ClearBlock such that no data clearance will occur. Signed-off-by: Thomas Parrott <[email protected]>
…ck block volumes Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit f4a79fb989d4bf5b18a89c2b4e219094acb9b2c8) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
…ume grow Based on commit 8a365c07ad8706dd491ac37b7cba485188985f79 from Stéphane Graber <[email protected]> Signed-off-by: Thomas Parrott <[email protected]> Suggested-by: Takero Funaki <[email protected]>
As we use a sparse writer which will skip any zero blocks, we need to discard (block) or truncate (file) prior to processing the data or we risk having leftover data from a previous snapshot interfere with the new state. Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit c9a1dfdb467c9873aa80eb75524e7fc74ce090e2) (cherry picked from commit d4acafdc5cb7cef729c0ab21f5c519914cca9dbc) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
Signed-off-by: Thomas Parrott <[email protected]>
…ock size for VM images Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit 0118bf8e78766fbed6d154342eeefda8974a347e) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
…umeUsage Signed-off-by: Thomas Parrott <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]> (cherry picked from commit 39d6313b3e8bef0faa7d3ac1c34dde485327d62a) Signed-off-by: Thomas Parrott <[email protected]> License: Apache-2.0
…rintf Signed-off-by: Thomas Parrott <[email protected]>
…rintf Signed-off-by: Thomas Parrott <[email protected]>
…cord in RefreshCustomVolume This way the raw input data from the external request isn't directly used by the storage driver. Signed-off-by: Thomas Parrott <[email protected]>
Go linter fix. Signed-off-by: Thomas Parrott <[email protected]>
93ef8f7 to
6b918d0
Compare
simondeziel
approved these changes
Jan 10, 2025
tomponline
added a commit
that referenced
this pull request
Jan 14, 2025
…ead of sparse write" (#14794) This reverts commit ab910ac from #14761. It is causing failures with our LVM CI tests due to the additional time it takes to do a slow `blkdiscard --zeroout` run when resetting the volume after an initial snapshot is transferred. As the other commit in this PR deals with resetting the newly created volume, no old data from previously deleted volumes will be present, and this commit is just designed to ensure that "holes" of zeroes in the incoming data stream don't corrupt the volume when using the sparse writer. As we've not landed the sparse writer yet, all of the bytes from the incoming data stream are written to the volume and thus there is no issue. So we can hold off from landing this commit until we land the sparse writer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.