mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -06:00
migration/block: Apply late-block-active behavior to postcopy
Postcopy never cared about late-block-active. However there's no mention in the capability that it doesn't apply to postcopy. Considering that we _assumed_ late activation is always good, do that too for postcopy unconditionally, just like precopy. After this patch, we should have unified the behavior across all. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Message-Id: <20241206230838.1111496-5-peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
fca9aef1c8
commit
61f2b48998
1 changed files with 12 additions and 13 deletions
|
@ -2137,22 +2137,21 @@ static void loadvm_postcopy_handle_run_bh(void *opaque)
|
||||||
|
|
||||||
trace_vmstate_downtime_checkpoint("dst-postcopy-bh-announced");
|
trace_vmstate_downtime_checkpoint("dst-postcopy-bh-announced");
|
||||||
|
|
||||||
/* Make sure all file formats throw away their mutable metadata.
|
|
||||||
* If we get an error here, just don't restart the VM yet. */
|
|
||||||
bdrv_activate_all(&local_err);
|
|
||||||
if (local_err) {
|
|
||||||
error_report_err(local_err);
|
|
||||||
local_err = NULL;
|
|
||||||
autostart = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
trace_vmstate_downtime_checkpoint("dst-postcopy-bh-cache-invalidated");
|
|
||||||
|
|
||||||
dirty_bitmap_mig_before_vm_start();
|
dirty_bitmap_mig_before_vm_start();
|
||||||
|
|
||||||
if (autostart) {
|
if (autostart) {
|
||||||
/* Hold onto your hats, starting the CPU */
|
/*
|
||||||
vm_start();
|
* Make sure all file formats throw away their mutable metadata.
|
||||||
|
* If we get an error here, just don't restart the VM yet.
|
||||||
|
*/
|
||||||
|
bdrv_activate_all(&local_err);
|
||||||
|
trace_vmstate_downtime_checkpoint("dst-postcopy-bh-cache-invalidated");
|
||||||
|
if (local_err) {
|
||||||
|
error_report_err(local_err);
|
||||||
|
local_err = NULL;
|
||||||
|
} else {
|
||||||
|
vm_start();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* leave it paused and let management decide when to start the CPU */
|
/* leave it paused and let management decide when to start the CPU */
|
||||||
runstate_set(RUN_STATE_PAUSED);
|
runstate_set(RUN_STATE_PAUSED);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue