mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: Stop dirty logging only if it has been started
Now that we introduced a separate method to indicate when the migration is started, both start_dirty_log() and stop_dirty_log() don't have to carry an implicit meaning as they can focus entirely on the dirty log being started or stopped. For that reason, we can now safely move stop_dirty_log() to the code section performing non-local migration. It makes only sense to stop logging dirty pages if this has been started before. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
a45e458c50
commit
b3ca1d90e9
@ -1142,6 +1142,9 @@ impl Vmm {
|
||||
|
||||
// Send last batch of dirty pages
|
||||
Self::vm_maybe_send_dirty_pages(vm, &mut socket)?;
|
||||
|
||||
// Stop logging dirty pages
|
||||
vm.stop_dirty_log()?;
|
||||
}
|
||||
// Capture snapshot and send it
|
||||
let vm_snapshot = vm.snapshot()?;
|
||||
@ -1174,12 +1177,7 @@ impl Vmm {
|
||||
info!("Migration complete");
|
||||
|
||||
// Let every Migratable object know about the migration being complete
|
||||
vm.complete_migration()?;
|
||||
|
||||
// Stop logging dirty pages
|
||||
vm.stop_dirty_log()?;
|
||||
|
||||
Ok(())
|
||||
vm.complete_migration()
|
||||
}
|
||||
|
||||
fn vm_send_migration(
|
||||
|
Loading…
Reference in New Issue
Block a user