From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTsTy-0002HU-KT for qemu-devel@nongnu.org; Wed, 09 Oct 2013 08:03:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTsTt-00049F-Ez for qemu-devel@nongnu.org; Wed, 09 Oct 2013 08:03:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTsTt-00048r-6r for qemu-devel@nongnu.org; Wed, 09 Oct 2013 08:03:09 -0400 Message-ID: <525545DE.2010505@redhat.com> Date: Wed, 09 Oct 2013 06:02:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <1380485683-4626-1-git-send-email-junqing.wang@cs2c.com.cn> <1380485683-4626-3-git-send-email-junqing.wang@cs2c.com.cn> <5249F842.8050405@redhat.com> <2c17177e.92cb.1419bfa46c2.Coremail.junqing.wang@cs2c.com.cn> In-Reply-To: <2c17177e.92cb.1419bfa46c2.Coremail.junqing.wang@cs2c.com.cn> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3NxCmXEMqPvV016qDtqVIT3oBQGT1CCgp" Subject: Re: [Qemu-devel] [PATCH v2 2/4] Curling: cmdline interface. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: junqing.wang@cs2c.com.cn Cc: pbonzini@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, owasserm@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3NxCmXEMqPvV016qDtqVIT3oBQGT1CCgp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [your emailer munged the reply, making it a bit hard to read. Are you set for plain-text-only mail to the list?] On 10/09/2013 12:49 AM, junqing.wang@cs2c.com.cn wrote: > >> +++ b/hmp.c >>> @@ -1213,10 +1213,11 @@ void hmp_migrate(Monitor *mon, const QDict *q= dict) >>> int detach =3D qdict_get_try_bool(qdict, "detach", 0); >>> int blk =3D qdict_get_try_bool(qdict, "blk", 0); >>> int inc =3D qdict_get_try_bool(qdict, "inc", 0); >>> + int ft =3D qdict_get_try_bool(qdict, "ft", 0); >> >> Why two spaces? >=20 > To align the '=3D', I will remove them if you like.=20 It's not a problem with me either way, other than we have a lot of code that doesn't care about alignment and consistently uses one space, and a fair amount of code where everything in a block of code is consistently aligned. But your patch was neither, in the context of the block it lives within - if you're going to align, then line up everything with the longest line 'int detach' (including blk and inc). >=20 > > >>> +++ b/qapi-schema.json >>> @@ -2420,7 +2420,8 @@ >>> # Since: 0.14.0 >>> ## >>> { 'command': 'migrate', >>> - 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': = 'bool' } } >>> + 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': = 'bool', >>> + '*ft': 'bool' } } >> >> Missing documentation, including mention that the new option was only >> made available in 1.7. We still don't have introspection; is there so= me >> other means by which libvirt and other management apps can tell whethe= r >> this feature is available?=20 >=20 > I'm not clear about how to do that, could you pls give me some hints, w= here to=20 > add code and documentation.=20 As for the documentation, qapi-schema.json has plenty of examples (look for a field with "(since 1.7)" as a hint for how to document an optional field added in a later release than the main struct). As for the introspection, Amos Kong was most recently working on trying to add that (but missed the 1.6 deadline, and I haven't seen work on it since). Introspection is not a hard requirement, but it makes it harder for libvirt to know if it can use 'ft':true if there is no other 'query-*' command that it can call first that would give it a hint that this is a new enough qemu to support 'ft' during migration. Maybe even having something listed under query-migrate-capabilities would be sufficient (ie. modify the 'MigrationCapability' enum to advertise a new capability). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3NxCmXEMqPvV016qDtqVIT3oBQGT1CCgp 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.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSVUXfAAoJEKeha0olJ0Nqh+8H/jDDlolzNGhy9VHpt3MuhJl3 YpPeU82VeEFu4wmeRdHsiieVvd/NP/B+GQse4MD/SFyoa6FwwPkjNo1KfmU157m5 VNSlg6COV3hIGUrakYJkxWGgJn9NbZArJUuoQANC9/qQt4nJd5+WjJE+tRyLjP5g +s3SEI+PUdgUvPNFEE/7BJoN1QmsvrcKQME20mBkzexoWA7aIPkF1Gv91vEt922I RdMXItrNdFUZAY1plkMwqg3n+sjkpZSHR1Rh7EXXPUz8DijikZY7b0cUa7tp/8QR F8zmwDNAbz+TcDWvUWhdy1fkXij9c5QXpfTYJ+8QWljap6yc7bSZiBI3UVvc8z4= =pfgB -----END PGP SIGNATURE----- --3NxCmXEMqPvV016qDtqVIT3oBQGT1CCgp--