Skip to content

Conversation

@tomponline
Copy link
Member

No description provided.

@tomponline tomponline self-assigned this Jan 8, 2025
@tomponline tomponline force-pushed the tp-discard branch 4 times, most recently from 8727cb8 to 437fa7f Compare January 8, 2025 13:47
@tomponline tomponline force-pushed the tp-discard branch 5 times, most recently from f840584 to 650a3d7 Compare January 8, 2025 15:59
@tomponline tomponline marked this pull request as ready for review January 9, 2025 08:46
stgraber and others added 6 commits January 10, 2025 09:43
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
tomponline and others added 12 commits January 10, 2025 14:50
…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
…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
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 39d6313b3e8bef0faa7d3ac1c34dde485327d62a)
Signed-off-by: Thomas Parrott <[email protected]>
License: Apache-2.0
…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]>
@tomponline tomponline merged commit c0d7e8f into canonical:main Jan 10, 2025
26 checks passed
@tomponline tomponline deleted the tp-discard branch January 14, 2025 08:18
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.
@tomponline tomponline changed the title Storage: Add block reset logic Storage: Add block reset logic (from Incus) Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants