[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/17] migration/block: Apply late-block-active behavior to postco
From: |
Fabiano Rosas |
Subject: |
[PULL 14/17] migration/block: Apply late-block-active behavior to postcopy |
Date: |
Tue, 17 Dec 2024 14:48:52 -0300 |
From: Peter Xu <peterx@redhat.com>
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>
---
migration/savevm.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 98821c8120..80726726fe 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2137,22 +2137,21 @@ static void loadvm_postcopy_handle_run_bh(void *opaque)
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();
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 {
/* leave it paused and let management decide when to start the CPU */
runstate_set(RUN_STATE_PAUSED);
--
2.35.3
- [PULL 06/17] migration/multifd: Remove sync processing on postcopy, (continued)
- [PULL 06/17] migration/multifd: Remove sync processing on postcopy, Fabiano Rosas, 2024/12/17
- [PULL 09/17] migration/multifd: Fix compat with QEMU < 9.0, Fabiano Rosas, 2024/12/17
- [PULL 02/17] migration/multifd: Further remove the SYNC on complete, Fabiano Rosas, 2024/12/17
- [PULL 10/17] s390x: Fix CSS migration, Fabiano Rosas, 2024/12/17
- [PULL 08/17] migration/multifd: Document the reason to sync for save_setup(), Fabiano Rosas, 2024/12/17
- [PULL 11/17] migration: Add helper to get target runstate, Fabiano Rosas, 2024/12/17
- [PULL 12/17] qmp/cont: Only activate disks if migration completed, Fabiano Rosas, 2024/12/17
- [PULL 13/17] migration/block: Make late-block-active the default, Fabiano Rosas, 2024/12/17
- [PULL 15/17] migration/block: Fix possible race with block_inactive, Fabiano Rosas, 2024/12/17
- [PULL 17/17] tests/qtest/migration: Fix compile errors when CONFIG_UADK is set, Fabiano Rosas, 2024/12/17
- [PULL 14/17] migration/block: Apply late-block-active behavior to postcopy,
Fabiano Rosas <=
- [PULL 16/17] migration/block: Rewrite disk activation, Fabiano Rosas, 2024/12/17
- Re: [PULL 00/17] Migration patches for 2024-12-17, Stefan Hajnoczi, 2024/12/19