pass vminfo by reference and improve sync error handling#1391
Merged
Conversation
Collaborator
Author
|
/windsurf-review |
Collaborator
Author
|
/windsurf-review |
b2992f8 to
0892f8f
Compare
0892f8f to
950bf06
Compare
Collaborator
Author
|
/windsurf-review |
| // Before starting NBD server, update disk info with new snapshot details | ||
| // We have marked block copy as false, in order to not update changeID. | ||
| // This should now update the snapname and snapBackingDisk with the new snapshot details and copy correctly. | ||
| err = vmops.UpdateDiskInfo(&vminfo, vminfo.VMDisks[idx], false) |
Contributor
There was a problem hiding this comment.
The SyncCBT function is updating vminfo with new snapshot details, but since vminfo is passed by value, these changes won't be reflected in the caller. The PR correctly changes this to pass by reference with &vminfo, ensuring updates are properly reflected globally.
Co-authored-by: Omkar Deshpande <omideshpande7@gmail.com>
Co-authored-by: Abhijeet Thakur <abhijeet.thakur@indexnine.com>
Signed-off-by: Geet Jain <geet@platform9.com> Co-authored-by: Geet Jain <geet-pf9@MacBookAir.localdomain> Co-authored-by: windsurf-bot[bot] <189301087+windsurf-bot[bot]@users.noreply.github.com>
sarika-pf9
approved these changes
Jan 22, 2026
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
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.
What this PR does / why we need it
Snapshot: Updated disk info before sync start to ensure work on fresh snapshots.
Which issue(s) this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged)fixes
Special notes for your reviewer
Testing done
please add testing details (logs, screenshots, etc.)