vm-migration: Snapshot should have a unique SnapshotDataSection

There's no reason to carry a HashMap of SnapshotDataSection per
Snapshot. And given we now provide at most one SnapshotDataSection per
Snapshot, there's no need to keep the id part of the SnapshotDataSection
structure.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2022-12-02 14:37:49 +01:00
parent 0489b6314e
commit 5b3bcfa233
8 changed files with 36 additions and 63 deletions

View File

@@ -522,7 +522,7 @@ impl VirtioPciDevice {
let state: Option<VirtioPciDeviceState> = snapshot
.as_ref()
.map(|s| s.to_versioned_state(&id))
.map(|s| s.to_versioned_state())
.transpose()
.map_err(|e| {
VirtioPciDeviceError::CreateVirtioPciDevice(anyhow!(