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

core: reverse snapshots list #263

Merged
merged 1 commit into from Apr 25, 2022
Merged

Conversation

bennyz
Copy link
Member

@bennyz bennyz commented Apr 12, 2022

Currently, when removing individual disk snapshots, they are grouped
by their respective disk_id and are removed together, in the order from
the parent to the child. For example:
A <- S2 <- S1

And we select disks from S1 and S2, S1 will be removed first and then
S2. However, since block commit was introduced, we only do forward
merges, meaning when removing S1, the child S2, will be the one removed
after its contents are merged into S1. So when the operation attempts to
merge S2, it will no longer exist.

This patch fixes the issue by reversing the order of images to start the
operation the other way around.

Bug-Url: https://bugzilla.redhat.com/2070451

@bennyz bennyz requested a review from ahadas as a code owner April 12, 2022 16:15
@bennyz bennyz marked this pull request as draft April 12, 2022 16:17
@bennyz
Copy link
Member Author

bennyz commented Apr 12, 2022

needs extensive testing as this is a very high risk area

@bennyz
Copy link
Member Author

bennyz commented Apr 12, 2022

/ost

@bennyz bennyz added the storage label Apr 13, 2022
Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the description of the PR explains it really well!

@bennyz
Copy link
Member Author

bennyz commented Apr 17, 2022

/ost

@bennyz bennyz marked this pull request as ready for review April 25, 2022 14:03
Currently, when removing individual disk snapshots, they are grouped
by their respective disk_id and are removed together, in the order from
the parent to the child. For example:
A <- S2 <- S1

And we select disks from S1 and S2, S1 will be removed first and then
S2. However, since block commit was introduced, we only do forward
merges, meaning when removing S1, the child S2, will be the one removed
after its contents are merged into S1. So when the operation attempts to
merge S2, it will no longer exist.

This patch fixes the issue by reversing the order of images to start the
operation the other way around.

Bug-Url: https://bugzilla.redhat.com/2070451
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
@bennyz
Copy link
Member Author

bennyz commented Apr 25, 2022

/ost

@bennyz bennyz merged commit e6ecc5e into oVirt:master Apr 25, 2022
@bennyz bennyz deleted the disk-snapshot-remove branch April 25, 2022 16:11
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.

None yet

2 participants