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

Reset dirty log on full snapshot path #4385

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/vmm/src/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ fn snapshot_memory_to_file(
.dump_dirty(&mut file, &dirty_bitmap)
.map_err(Memory)
}
SnapshotType::Full => vmm.guest_memory().dump(&mut file).map_err(Memory),
SnapshotType::Full => {
let _ = vmm.get_dirty_bitmap().map_err(DirtyBitmap)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should only get the bitmap if it exists (see CI errors). Probably by handling the error here.

vmm.guest_memory().dump(&mut file).map_err(Memory)
}
}?;
file.flush()
.map_err(|err| MemoryBackingFile("flush", err))?;
Expand Down