From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axZX2-0006iF-Ou for qemu-devel@nongnu.org; Tue, 03 May 2016 08:34:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axZWq-0001Ql-WB for qemu-devel@nongnu.org; Tue, 03 May 2016 08:34:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axZWq-0001Mg-OA for qemu-devel@nongnu.org; Tue, 03 May 2016 08:34:16 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E217C04B332 for ; Tue, 3 May 2016 12:34:05 +0000 (UTC) References: <1461903820-3092-1-git-send-email-eblake@redhat.com> <1461903820-3092-11-git-send-email-eblake@redhat.com> <20160503094447.GE2242@work-vm> <87inyv5nv7.fsf@dusky.pond.sub.org> From: Eric Blake Message-ID: <57289ABB.9080809@redhat.com> Date: Tue, 3 May 2016 06:34:03 -0600 MIME-Version: 1.0 In-Reply-To: <87inyv5nv7.fsf@dusky.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KegmMghNaNWGTrM1vkpwdm9WGbCaxKv0v" Subject: Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , "Dr. David Alan Gilbert" Cc: Amit Shah , Juan Quintela , famz@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KegmMghNaNWGTrM1vkpwdm9WGbCaxKv0v Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/03/2016 06:26 AM, Markus Armbruster wrote: >>> + visit_type_int(vmdesc, "size", &size, &error_abort); >>> + visit_start_list(vmdesc, "fields", NULL, 0, &error_abort); >>> + visit_start_struct(vmdesc, NULL, NULL, 0, &error_abort); >> >> Please avoid error_abort in migration code, especially on the source s= ide. >> You've got an apparently happily working VM, we must never kill it=20 >> while attempting migration. >=20 > These functions cannot fail, and &error_abort is a concise way to > express that. It's the same as >=20 > visit_type_int(vmdesc, "size", &size, &err); > assert(!err); &error_abort is ONLY supposed to be used to flag programming errors (ie. they should never be reachable). I'm asserting that the errors don't happen, and therefore this cannot make the migration fail - in other words, this is NOT going to kill a VM that attempts migration. > * Conditions where the JSON output visitor itself sets an error: >=20 > - None. The JSON output visitor itself may be adding an error for an attempt to output Inf or NaN for a floating point number - but since vmstate doesn't use visit_type_number(), this is not possible. And if we are really worried about it, then in my next spin of the patch I may make it user-configurable whether we stick to strict JSON or whether we relax things and output Inf/NaN anyways. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --KegmMghNaNWGTrM1vkpwdm9WGbCaxKv0v 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/ iQEcBAEBCAAGBQJXKJq7AAoJEKeha0olJ0NqjrQIAI9SCouqTrzWqH+0V5SnrMlx AQtEXLvA6F3kGHynWfgnqMmDltEorl3g4NI2qFi8F0tefUEE0nPGDHenkSFt7W97 WGnY2gLTj6p1xUwm6kxEz4+SbJMn2TuWkGqrJA73NlbX/qtGy6YBj86fQpnJytIg +vg8g1buCZkoGQemb6czvn7ApIMVN94WsEjiWagrL22o8psHgyoqKRZHiI8awl95 apG2/n4W/YFLq5sUjiXEHXjHPWEIJ5oqfMo0cGAHXuVoQt/IV3SYiZeQGnXYG68c c9yGteDex+xxd/D4h/1SptAKXiiG78HuR5bNOSTXz+EwfeYxNlHI4oy9+FwA1OI= =SfJY -----END PGP SIGNATURE----- --KegmMghNaNWGTrM1vkpwdm9WGbCaxKv0v--