qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, jdenemar@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/3] migration: Add migration events on target side
Date: Wed, 20 May 2015 10:10:11 -0600	[thread overview]
Message-ID: <555CB1E3.7020904@redhat.com> (raw)
In-Reply-To: <1432136124-24572-4-git-send-email-quintela@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1579 bytes --]

On 05/20/2015 09:35 AM, Juan Quintela wrote:
> We reuse the migration events from the source side, sending them on the
> appropiate place.

s/appropiate/appropriate/

> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration/migration.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 

> @@ -116,14 +117,17 @@ static void process_incoming_migration_co(void *opaque)
>      Error *local_err = NULL;
>      int ret;
> 
> +    qapi_event_send_migration(MIGRATION_STATUS_ACTIVE, &error_abort);
>      ret = qemu_loadvm_state(f);
>      qemu_fclose(f);
>      free_xbzrle_decoded_buf();
>      if (ret < 0) {
> +        qapi_event_send_migration(MIGRATION_STATUS_FAILED, &error_abort);
>          error_report("load of migration failed: %s", strerror(-ret));
>          migrate_decompress_threads_join();
>          exit(EXIT_FAILURE);

Does qapi_event_send_* send an event right away, or merely just queue
things up to be sent at a safe point later in the overall event loop?
Or put another way, could the early exit() here prevent the actual error
from being delivered, because we don't return control to the event loop
to actually flush the pending event queue?

But whether or not we have a design issue on the failure path, at least
something got printed via error_report, and the real benefit of this
patch is the event on success; so I'm fine with giving this patch:

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-05-20 16:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 15:35 [Qemu-devel] [PATCH v4 0/3] Migration Events Juan Quintela
2015-05-20 15:35 ` [Qemu-devel] [PATCH 1/3] migration: Remove duplicated assignement of SETUP status Juan Quintela
2015-05-20 15:58   ` Eric Blake
2015-05-20 16:03     ` John Snow
2015-06-03  9:14       ` Juan Quintela
2015-05-20 15:35 ` [Qemu-devel] [PATCH 2/3] migration: create migration event Juan Quintela
2015-05-20 16:02   ` Eric Blake
2015-05-21  9:49     ` Juan Quintela
2015-06-17  0:20     ` Juan Quintela
2015-05-29 11:45   ` Jiri Denemark
2015-06-17  0:12     ` Juan Quintela
2015-05-20 15:35 ` [Qemu-devel] [PATCH 3/3] migration: Add migration events on target side Juan Quintela
2015-05-20 16:10   ` Eric Blake [this message]
2015-05-21  9:57     ` Juan Quintela
2015-06-02 12:44 ` [Qemu-devel] [PATCH v4 0/3] Migration Events Jiri Denemark

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=555CB1E3.7020904@redhat.com \
    --to=eblake@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 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).