mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-migration: Don't store the id as part of Snapshot structure
The information about the identifier related to a Snapshot is only relevant from the BTreeMap perspective, which is why we can get rid of the duplicated identifier in every Snapshot structure. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -489,12 +489,9 @@ impl Snapshottable for Vdpa {
|
||||
)));
|
||||
}
|
||||
|
||||
let snapshot = Snapshot::new_from_versioned_state(
|
||||
&self.id(),
|
||||
&self.state().map_err(|e| {
|
||||
MigratableError::Snapshot(anyhow!("Error snapshotting vDPA device: {:?}", e))
|
||||
})?,
|
||||
)?;
|
||||
let snapshot = Snapshot::new_from_versioned_state(&self.state().map_err(|e| {
|
||||
MigratableError::Snapshot(anyhow!("Error snapshotting vDPA device: {:?}", e))
|
||||
})?)?;
|
||||
|
||||
// Force the vhost handler to be dropped in order to close the vDPA
|
||||
// file. This will ensure the device can be accessed if the VM is
|
||||
|
||||
Reference in New Issue
Block a user