qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: kwolf@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org,
	armbru@redhat.com, avi@redhat.com, amit.shah@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/8] Drop the incoming_expected global variable
Date: Sun, 14 Aug 2011 11:42:13 -0500	[thread overview]
Message-ID: <4E47FAE5.5080802@codemonkey.ws> (raw)
In-Reply-To: <1313008408-23161-5-git-send-email-lcapitulino@redhat.com>

On 08/10/2011 03:33 PM, Luiz Capitulino wrote:
> Test against RSTATE_IN_MIGRATE instead.
>
> Please, note that the RSTATE_IN_MIGRATE state is only set when all the
> initial VM setup is done, while 'incoming_expected' was set right in
> the beginning when parsing command-line options. Shouldn't be a problem
> as far as I could check.
>
> Signed-off-by: Luiz Capitulino<lcapitulino@redhat.com>
> ---
>   migration.c |    2 --
>   monitor.c   |    2 +-
>   vl.c        |    2 --
>   3 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index f482f8c..a1a955d 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -70,8 +70,6 @@ void process_incoming_migration(QEMUFile *f)
>       qemu_announce_self();
>       DPRINTF("successfully loaded vm state\n");
>
> -    incoming_expected = false;
> -
>       if (autostart) {
>           vm_start();
>       } else {
> diff --git a/monitor.c b/monitor.c
> index cffef22..72f26ab 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -1309,7 +1309,7 @@ static int do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data)
>   {
>       struct bdrv_iterate_context context = { mon, 0 };
>
> -    if (incoming_expected) {
> +    if (runstate_get() == RSTATE_IN_MIGRATE) {

This reads a little odd to me.  I think having a:

if (runstate_check(RSTATE_IN_MIGRATE)) {

Would read a bit more clearly.

Regards,

Anthony Liguori

  reply	other threads:[~2011-08-14 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 20:33 [Qemu-devel] [PATCH v2 0/8]: Introduce the RunState type Luiz Capitulino
2011-08-10 20:33 ` [Qemu-devel] [PATCH 1/8] Move vm_state_notify() prototype from cpus.h to sysemu.h Luiz Capitulino
2011-08-10 20:33 ` [Qemu-devel] [PATCH 2/8] Replace the VMSTOP macros with a proper state type Luiz Capitulino
2011-08-10 20:33 ` [Qemu-devel] [PATCH 3/8] RunState: Add additional states Luiz Capitulino
2011-08-10 20:33 ` [Qemu-devel] [PATCH 4/8] Drop the incoming_expected global variable Luiz Capitulino
2011-08-14 16:42   ` Anthony Liguori [this message]
2011-08-10 20:33 ` [Qemu-devel] [PATCH 5/8] Drop the vm_running " Luiz Capitulino
2011-08-14 16:43   ` Anthony Liguori
2011-08-10 20:33 ` [Qemu-devel] [PATCH 6/8] Monitor: Don't allow cont on bad VM state Luiz Capitulino
2011-08-10 20:33 ` [Qemu-devel] [PATCH 7/8] QMP: query-status: Introduce 'status' key Luiz Capitulino
2011-08-14 16:44   ` Anthony Liguori
2011-08-10 20:33 ` [Qemu-devel] [PATCH 8/8] HMP: info status: Print the VM state Luiz Capitulino
2011-08-14 16:45 ` [Qemu-devel] [PATCH v2 0/8]: Introduce the RunState type Anthony Liguori
2011-08-15 21:44   ` Luiz Capitulino
  -- strict thread matches above, loose matches on Subject: below --
2011-09-01 18:12 [Qemu-devel] [PATCH v3 " Luiz Capitulino
2011-09-01 18:12 ` [Qemu-devel] [PATCH 4/8] Drop the incoming_expected global variable Luiz Capitulino

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=4E47FAE5.5080802@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).