From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv6ZX-0004IB-Cy for qemu-devel@nongnu.org; Wed, 20 May 2015 12:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yv6ZR-00019r-D6 for qemu-devel@nongnu.org; Wed, 20 May 2015 12:10:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv6ZR-00019l-5g for qemu-devel@nongnu.org; Wed, 20 May 2015 12:10:13 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4KGACmx000555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 20 May 2015 12:10:12 -0400 Message-ID: <555CB1E3.7020904@redhat.com> Date: Wed, 20 May 2015 10:10:11 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432136124-24572-1-git-send-email-quintela@redhat.com> <1432136124-24572-4-git-send-email-quintela@redhat.com> In-Reply-To: <1432136124-24572-4-git-send-email-quintela@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uSGPIk8BTPwJ5vG1jEse405frTNvIRKm4" Subject: Re: [Qemu-devel] [PATCH 3/3] migration: Add migration events on target side List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela , qemu-devel@nongnu.org Cc: amit.shah@redhat.com, jdenemar@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uSGPIk8BTPwJ5vG1jEse405frTNvIRKm4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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/ >=20 > Signed-off-by: Juan Quintela > --- > migration/migration.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > @@ -116,14 +117,17 @@ static void process_incoming_migration_co(void *o= paque) > Error *local_err =3D NULL; > int ret; >=20 > + qapi_event_send_migration(MIGRATION_STATUS_ACTIVE, &error_abort); > ret =3D qemu_loadvm_state(f); > qemu_fclose(f); > free_xbzrle_decoded_buf(); > if (ret < 0) { > + qapi_event_send_migration(MIGRATION_STATUS_FAILED, &error_abor= t); > 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --uSGPIk8BTPwJ5vG1jEse405frTNvIRKm4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVXLHjAAoJEKeha0olJ0NqpOQIAK87KA1UpV98rXLK74PwU+Yw lkjBvnQz+98w9g1emNIn2MEmFAx7Huu1x5/6b2qcLekP+iyanRQu0rxggnbjaYbq 8sN2msEps7TDasTh7Up/12DhlQHOn6AWIC+UhxnG/JL8t/5T47vQWKWb3Tc7YYy4 U4wN06iIblB8ppbB+5Lt2Js9T9GAKfn20om2qIEKjTgnJcof+UmgwOSw+acKph1D wQ2LjfUFm5NuKRBsCwed5NB6RDaEsi8Bh+QCygONy+crVL/xteZor+KQw6d6TLT0 pq7prJN4NAHcakxx0juobQHYvRv9ZW47/lFVQobDlwTSmEKLlasP5I+04UBc/is= =5M8m -----END PGP SIGNATURE----- --uSGPIk8BTPwJ5vG1jEse405frTNvIRKm4--