vm-migration: Rename add_data_section() into add_data()

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2022-12-02 15:46:56 +01:00
parent 748018ace3
commit 4ae6b595d7
5 changed files with 7 additions and 7 deletions

View File

@ -154,7 +154,7 @@ impl Snapshot {
T: Serialize,
{
let mut snapshot_data = Snapshot::default();
snapshot_data.add_data_section(SnapshotData::new_from_state(state)?);
snapshot_data.add_data(SnapshotData::new_from_state(state)?);
Ok(snapshot_data)
}
@ -165,7 +165,7 @@ impl Snapshot {
T: Versionize + VersionMapped,
{
let mut snapshot_data = Snapshot::default();
snapshot_data.add_data_section(SnapshotData::new_from_versioned_state(state)?);
snapshot_data.add_data(SnapshotData::new_from_versioned_state(state)?);
Ok(snapshot_data)
}
@ -176,7 +176,7 @@ impl Snapshot {
}
/// Add a SnapshotData to the component snapshot data.
pub fn add_data_section(&mut self, section: SnapshotData) {
pub fn add_data(&mut self, section: SnapshotData) {
self.snapshot_data = Some(section);
}

View File

@ -400,7 +400,7 @@ impl Snapshottable for Vcpu {
.map_err(|e| MigratableError::Pause(anyhow!("Could not get vCPU state {:?}", e)))?;
let mut vcpu_snapshot = Snapshot::default();
vcpu_snapshot.add_data_section(SnapshotData::new_from_state(&saved_state)?);
vcpu_snapshot.add_data(SnapshotData::new_from_state(&saved_state)?);
self.saved_state = Some(saved_state);

View File

@ -4456,7 +4456,7 @@ impl Snapshottable for DeviceManager {
}
// Then we store the DeviceManager state.
snapshot.add_data_section(SnapshotData::new_from_state(&self.state())?);
snapshot.add_data(SnapshotData::new_from_state(&self.state())?);
Ok(snapshot)
}

View File

@ -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(SnapshotData::new_from_versioned_state(
memory_manager_snapshot.add_data(SnapshotData::new_from_versioned_state(
&self.snapshot_data(),
)?);

View File

@ -2532,7 +2532,7 @@ impl Snapshottable for Vm {
(device_manager.id(), device_manager.snapshot()?)
};
vm_snapshot.add_snapshot(id, snapshot);
vm_snapshot.add_data_section(SnapshotData(vm_snapshot_data));
vm_snapshot.add_data(SnapshotData(vm_snapshot_data));
event!("vm", "snapshotted");
Ok(vm_snapshot)