From: Eric Blake <eblake@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
Fabiano Rosas <farosas@suse.de>,
Juraj Marcin <jmarcin@redhat.com>
Subject: Re: [PATCH v2 2/5] migration/postcopy: set destination postcopy-active in the run BH
Date: Wed, 11 Nov 2026 10:34:27 -0600 [thread overview]
Message-ID: <avSYgKj47LSRKOm8@redhat.com> (raw)
In-Reply-To: <20261110183257.2930908-3-den@openvz.org>
On Tue, Nov 10, 2026 at 07:32:54PM +0100, Denis V. Lunev wrote:
> From: Denis V. Lunev <den@openvz.org>
>
> Commit 7b842fe354c ("migration: Introduce POSTCOPY_DEVICE state") made
> the destination enter POSTCOPY_ACTIVE in loadvm_postcopy_handle_run(),
> before it schedules loadvm_postcopy_handle_run_bh(), and only the BH
> starts the VM or moves it to RUN_STATE_PAUSED. Management reacting to
> the destination's postcopy-active event can therefore still find the
> VM in RUN_STATE_INMIGRATE, where blockdev-add creates inactive nodes
> and attaching a device to them fails with "Block node is read-only".
>
> Move the transition to the end of the run BH, after vm_start() or
> runstate_set(), as process_incoming_migration_bh() does for precopy
> COMPLETED. Without a return path the listen thread enters
> POSTCOPY_ACTIVE directly, and the fast snapshot load path switches
> right after scheduling the BH; in both cases the state is no longer
> POSTCOPY_DEVICE when the BH runs and the transition is a no-op.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Cc: Peter Xu <peterx@redhat.com>
> Cc: Fabiano Rosas <farosas@suse.de>
> Cc: Juraj Marcin <jmarcin@redhat.com>
> ---
> migration/savevm.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
I'll defer to Peter's judgment on this one and 4/5, but the
descriptions in the cover letter and commit message make sense to
me. Meanwhile, I'm setting up to play with 3 and 5/5 to see if I can
review those tests for catching the issues documented here, even if
I'm less comfortable being the sole reviewer on the code changes that
got them to pass.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
next prev parent reply other threads:[~2026-11-11 16:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 18:32 [PATCH v2 0/5] migration/postcopy: report destination states only after the run state change Denis V. Lunev
2026-11-10 18:32 ` [PATCH v2 1/5] migration/postcopy: report COMPLETED only after the run BH has run Denis V. Lunev
2026-11-11 16:20 ` Eric Blake
2026-11-10 18:32 ` [PATCH v2 2/5] migration/postcopy: set destination postcopy-active in the run BH Denis V. Lunev
2026-11-11 16:34 ` Eric Blake [this message]
2026-11-10 18:32 ` [PATCH v2 3/5] tests/qtest/migration: check the destination run state in postcopy tests Denis V. Lunev
2026-11-11 17:32 ` Eric Blake
2026-11-10 18:32 ` [PATCH v2 4/5] migration/postcopy: answer the package-loaded ping from the run BH Denis V. Lunev
2026-11-10 18:32 ` [PATCH v2 5/5] iotests/migrate-bitmaps-postcopy-test: cover postcopy with a return path Denis V. Lunev
2026-11-11 20:03 ` Eric Blake
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=avSYgKj47LSRKOm8@redhat.com \
--to=eblake@redhat.com \
--cc=den@openvz.org \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.