vm-migration: Rename SnapshotDataSection into SnapshotData

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2022-12-02 14:49:22 +01:00
parent 1b32e2f8b2
commit 4517b76a23
5 changed files with 19 additions and 19 deletions

View File

@@ -77,8 +77,8 @@ use vm_memory::ByteValued;
use vm_memory::{Bytes, GuestAddressSpace};
use vm_memory::{GuestAddress, GuestMemoryAtomic};
use vm_migration::{
snapshot_from_id, Migratable, MigratableError, Pausable, Snapshot, SnapshotDataSection,
Snapshottable, Transportable,
snapshot_from_id, Migratable, MigratableError, Pausable, Snapshot, SnapshotData, Snapshottable,
Transportable,
};
use vmm_sys_util::eventfd::EventFd;
use vmm_sys_util::signal::{register_signal_handler, SIGRTMIN};
@@ -403,7 +403,7 @@ impl Snapshottable for Vcpu {
// TODO: The special format of the CPU id can be removed once ready to
// break live upgrade.
let mut vcpu_snapshot = Snapshot::new(&format!("{:03}", self.id));
vcpu_snapshot.add_data_section(SnapshotDataSection::new_from_state(&saved_state)?);
vcpu_snapshot.add_data_section(SnapshotData::new_from_state(&saved_state)?);
self.saved_state = Some(saved_state);

View File

@@ -95,7 +95,7 @@ use vm_memory::{Address, GuestAddress, GuestUsize, MmapRegion};
use vm_memory::{GuestAddressSpace, GuestMemory};
use vm_migration::{
protocol::MemoryRangeTable, snapshot_from_id, versioned_state_from_id, Migratable,
MigratableError, Pausable, Snapshot, SnapshotDataSection, Snapshottable, Transportable,
MigratableError, Pausable, Snapshot, SnapshotData, Snapshottable, Transportable,
};
use vm_virtio::AccessPlatform;
use vm_virtio::VirtioDeviceType;
@@ -4456,7 +4456,7 @@ impl Snapshottable for DeviceManager {
}
// Then we store the DeviceManager state.
snapshot.add_data_section(SnapshotDataSection::new_from_state(&self.state())?);
snapshot.add_data_section(SnapshotData::new_from_state(&self.state())?);
Ok(snapshot)
}

View File

@@ -52,7 +52,7 @@ use vm_memory::{
};
use vm_migration::{
protocol::MemoryRange, protocol::MemoryRangeTable, Migratable, MigratableError, Pausable,
Snapshot, SnapshotDataSection, Snapshottable, Transportable, VersionMapped,
Snapshot, SnapshotData, Snapshottable, Transportable, VersionMapped,
};
pub const MEMORY_MANAGER_ACPI_SIZE: usize = 0x18;
@@ -2442,7 +2442,7 @@ impl Snapshottable for MemoryManager {
// memory range content for the ranges requiring it.
self.snapshot_memory_ranges = memory_ranges;
memory_manager_snapshot.add_data_section(SnapshotDataSection::new_from_versioned_state(
memory_manager_snapshot.add_data_section(SnapshotData::new_from_versioned_state(
&self.snapshot_data(),
)?);

View File

@@ -93,7 +93,7 @@ use vm_memory::{Bytes, GuestAddress, GuestAddressSpace, GuestMemoryAtomic};
use vm_migration::protocol::{Request, Response, Status};
use vm_migration::{
protocol::MemoryRangeTable, snapshot_from_id, Migratable, MigratableError, Pausable, Snapshot,
SnapshotDataSection, Snapshottable, Transportable,
SnapshotData, Snapshottable, Transportable,
};
use vmm_sys_util::eventfd::EventFd;
use vmm_sys_util::signal::unblock_signal;
@@ -2521,7 +2521,7 @@ impl Snapshottable for Vm {
vm_snapshot.add_snapshot(self.memory_manager.lock().unwrap().snapshot()?);
vm_snapshot.add_snapshot(self.device_manager.lock().unwrap().snapshot()?);
vm_snapshot.add_data_section(SnapshotDataSection(vm_snapshot_data));
vm_snapshot.add_data_section(SnapshotData(vm_snapshot_data));
event!("vm", "snapshotted");
Ok(vm_snapshot)