From: Fiona Ebner <f.ebner@proxmox.com>
To: Erik Fastermann <e.fastermann@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu v2 9/9] savevm-async: restore run state from before snapshot
Date: Tue, 8 Sep 2026 16:22:08 +0200 [thread overview]
Message-ID: <6e21c5b8-7010-478d-b4d5-333b85b129a5@proxmox.com> (raw)
In-Reply-To: <20260907094744.131193-10-e.fastermann@proxmox.com>
Am 07.09.26 um 11:49 AM schrieb Erik Fastermann:
> @@ -230,6 +231,24 @@ index 0000000000..56c60b345f
> + return snap_state.state == SAVE_STATE_COMPLETED && snap_state.skip_vm_start;
> +}
> +
> ++static void restore_vm_old_state(void)
> ++{
> ++ RunState old_state = snap_state.vm_old_state;
> ++
> ++ if (old_state == RUN_STATE__MAX) {
> ++ return;
> ++ }
> ++ snap_state.vm_old_state = RUN_STATE__MAX;
> ++
> ++ if (runstate_is_live(old_state)) {
> ++ if (!should_skip_vm_start() && !runstate_check(RUN_STATE_SHUTDOWN)) {
> ++ vm_start();
> ++ }
> ++ } else if (runstate_check(RUN_STATE_FINISH_MIGRATE)) {
I'd prefer this condition to be dropped or extended to also check for
RUN_STATE_SAVE_VM. Because when not using a statefile, we call
vm_stop(RUN_STATE_SAVE_VM) and do not set the state to
RUN_STATE_FINISH_MIGRATE. It might be fine in practice, because if the
runstate was not live, then RUN_STATE_SAVE_VM is not actually applied,
as vm_stop() skips setting the state if already not live. But still, it
would be good to be explicit about it.
> ++ runstate_set(old_state);
> ++ }
> ++}
> ++
next prev parent reply other threads:[~2026-09-08 14:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 9:47 [PATCH qemu v2 0/9] savevm-async: fix stuck paused vm after snapshot Erik Fastermann
2026-09-07 9:47 ` [PATCH qemu v2 1/9] d/patches: normalize header of pbs-restore no-cache patch Erik Fastermann
2026-09-07 9:47 ` [PATCH qemu v2 2/9] pbs-restore: keep callback data on the stack Erik Fastermann
2026-09-07 9:47 ` [PATCH qemu v2 3/9] migration/qemu-file: allocate buffer with g_malloc Erik Fastermann
2026-09-07 9:47 ` [PATCH qemu v2 4/9] migration/pbs-state: check allocation of incoming state buffer Erik Fastermann
2026-09-07 9:47 ` [PATCH qemu v2 5/9] savevm-async: drop QIOChannel reference Erik Fastermann
2026-09-08 14:22 ` Fiona Ebner
2026-09-07 9:47 ` [PATCH qemu v2 6/9] savevm-async: free migration vmdesc Erik Fastermann
2026-09-08 14:22 ` Fiona Ebner
2026-09-07 9:47 ` [PATCH qemu v2 7/9] savevm-async: release resources on start failure path Erik Fastermann
2026-09-07 9:47 ` [PATCH qemu v2 8/9] savevm-async: include reason when file open fails Erik Fastermann
2026-09-07 9:47 ` [PATCH qemu v2 9/9] savevm-async: restore run state from before snapshot Erik Fastermann
2026-09-08 14:22 ` Fiona Ebner [this message]
2026-09-08 14:21 ` partially-applied: [PATCH qemu v2 0/9] savevm-async: fix stuck paused vm after snapshot Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e21c5b8-7010-478d-b4d5-333b85b129a5@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=e.fastermann@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.