[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/17] qmp/cont: Only activate disks if migration completed
From: |
Fabiano Rosas |
Subject: |
[PULL 12/17] qmp/cont: Only activate disks if migration completed |
Date: |
Tue, 17 Dec 2024 14:48:50 -0300 |
From: Peter Xu <peterx@redhat.com>
As the comment says, the activation of disks is for the case where
migration has completed, rather than when QEMU is still during
migration (RUN_STATE_INMIGRATE).
Move the code over to reflect what the comment is describing.
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20241206230838.1111496-3-peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
monitor/qmp-cmds.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index f84a0dc523..76f21e8af3 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -96,21 +96,23 @@ void qmp_cont(Error **errp)
}
}
- /* Continuing after completed migration. Images have been inactivated to
- * allow the destination to take control. Need to get control back now.
- *
- * If there are no inactive block nodes (e.g. because the VM was just
- * paused rather than completing a migration), bdrv_inactivate_all() simply
- * doesn't do anything. */
- bdrv_activate_all(&local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
-
if (runstate_check(RUN_STATE_INMIGRATE)) {
autostart = 1;
} else {
+ /*
+ * Continuing after completed migration. Images have been
+ * inactivated to allow the destination to take control. Need to
+ * get control back now.
+ *
+ * If there are no inactive block nodes (e.g. because the VM was
+ * just paused rather than completing a migration),
+ * bdrv_inactivate_all() simply doesn't do anything.
+ */
+ bdrv_activate_all(&local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
+ return;
+ }
vm_start();
}
}
--
2.35.3
- [PULL 04/17] migration/ram: Move RAM_SAVE_FLAG* into ram.h, (continued)
- [PULL 04/17] migration/ram: Move RAM_SAVE_FLAG* into ram.h, Fabiano Rosas, 2024/12/17
- [PULL 07/17] migration/multifd: Cleanup src flushes on condition check, Fabiano Rosas, 2024/12/17
- [PULL 01/17] migration/multifd: Fix compile error caused by page_size usage, Fabiano Rosas, 2024/12/17
- [PULL 03/17] migration/multifd: Allow to sync with sender threads only, Fabiano Rosas, 2024/12/17
- [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 <=
- [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, 2024/12/17
- [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