From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgEj4-0007gf-Py for qemu-devel@nongnu.org; Mon, 20 Oct 2014 11:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgEiz-00048d-NG for qemu-devel@nongnu.org; Mon, 20 Oct 2014 11:18:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgEiz-00048V-El for qemu-devel@nongnu.org; Mon, 20 Oct 2014 11:18:21 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9KFIKBq003257 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 20 Oct 2014 11:18:20 -0400 Message-ID: <544527BB.1060500@redhat.com> Date: Mon, 20 Oct 2014 09:18:19 -0600 From: Eric Blake MIME-Version: 1.0 References: <1413359710-2799-1-git-send-email-quintela@redhat.com> <1413359710-2799-3-git-send-email-quintela@redhat.com> <20141020102408.GF2517@work-vm> <87egu357yl.fsf@elfo.elfo> In-Reply-To: <87egu357yl.fsf@elfo.elfo> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e8OuS9JRFQaT6c1jRb2jCv1qWXSBWSAW2" Subject: Re: [Qemu-devel] [PATCH 2/7] runstate: Add runstate store List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com, "Dr. David Alan Gilbert" Cc: kwolf@redhat.com, qemu-devel@nongnu.org, laine@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e8OuS9JRFQaT6c1jRb2jCv1qWXSBWSAW2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/20/2014 04:52 AM, Juan Quintela wrote: > "Dr. David Alan Gilbert" wrote: >> * Juan Quintela (quintela@redhat.com) wrote: >>> This allows us to store the current state to send it through migratio= n. >> >> Why store the runstate as a string? The later code then ends up doing= >> string compares and things - why not just use the enum value? >=20 > How do you know that it has the same values both sides? As far as I ca= n > see, all interaction with the outside is done with strings (i.e. QMP). If it's part of the migration stream, then it is not something visible in QMP, and it is your own fault if you ever change the enum values in such a way that the migration stream is incompatible between versions. I think using an enum in the migration stream is just fine, and more efficient. >=20 > But it is easier for me if I can sent the numeric value. >=20 > Libvirt folks? As far as I can tell, libvirt is unimpacted by HOW it is represented in the migration stream, only that the destination is able to inform libvirt what state was received as part of migration, with libvirt having an easy way to then get back into that state (of course, libvirt should also still have the option to choose a different state than what just got migrated, as in the case where the user pauses the source in order to avoid convergence problems but wants the destination to start running again). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --e8OuS9JRFQaT6c1jRb2jCv1qWXSBWSAW2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJURSe7AAoJEKeha0olJ0NqqsIIAJay4D66EYk+UYNi/Radtrlh S+i4O6CcRkH8YHq6jq9VG0FA75J4jBlxD+rqMOFj/9RBlMVMmERKRI0nSEKPHh3M WCE97ygw9UIBGccgySxPIHBZF/lX7siPLR+KQf4052tVyAnwCSVT1YEv3DYKm9u5 2Z67/DMOl/fo03caHCM0WWKDNZQ4OyKZKtntWDs2ri6FwukpgcK07PeJ3/v7ko2T /YPmq6/8b/wOSlqPBs51jaxXK5rurHGD8vd3imiimjBqEAcrAVFrhfe4V5buFUsN 6vgymv6CXP0GeHQjvfUaNNU5d3ehqx8yzYWGwuZhZrNF4ucIEFZbhb0bACAqpoc= =y24n -----END PGP SIGNATURE----- --e8OuS9JRFQaT6c1jRb2jCv1qWXSBWSAW2--