From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3DaD-0002R6-DV for qemu-devel@nongnu.org; Thu, 01 Mar 2012 16:30:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3DZt-00080J-17 for qemu-devel@nongnu.org; Thu, 01 Mar 2012 16:30:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3DZs-0007zH-Oo for qemu-devel@nongnu.org; Thu, 01 Mar 2012 16:30:20 -0500 Message-ID: <4F4FEA65.2080903@redhat.com> Date: Thu, 01 Mar 2012 14:30:13 -0700 From: Eric Blake MIME-Version: 1.0 References: <1330600908-16202-1-git-send-email-pbonzini@redhat.com> <4F4FE5B7.2080306@codemonkey.ws> In-Reply-To: <4F4FE5B7.2080306@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig83D90F3BE67DC988A6BDB06B" Subject: Re: [Qemu-devel] [PATCH v2 0/6] Mirrored writes using blockdev-transaction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kwolf@redhat.com, stefanha@linux.vnet.ibm.com, jcody@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, fsimonce@redhat.com, Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig83D90F3BE67DC988A6BDB06B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/01/2012 02:10 PM, Anthony Liguori wrote: >> 2) Execute the following QMP command >> >> { "execute": "qmp_capabilities" } >> { "execute": "blockdev-transaction", "arguments": >> {'actions': [ >> { 'type': 'snapshot', 'data' : >> { 'device': 'ide0-hd0', 'snapshot-file': >> '/home/pbonzini/base.qcow2' } }, >> { 'type': 'mirror', 'data' : >> { 'device': 'ide0-hd0', 'target': '/home/pbonzini/mirror.qcow2'= >> } } ] } } >> { "execute": "cont" } >=20 > We don't have schema introspection today. How would one determine when= > new transaction types are available? >=20 > I think we need some sort of introspection method too in order for > clients to figure out when the command is extended. >=20 I agree that introspection is necessary. Up till now, libvirt could get by with query-commands (either a command exists or it doesn't). But now we have the case where blockdev-transaction might exist, but doesn't support the particular union action such as 'mirror' that libvirt wants to use. Could this be something we wire up to the query-commands command? Something like: { 'type': 'CommandInfo', 'data': {'name': 'str', '*syntax': 'str'} } { 'command': 'query-commands, 'data': { '*syntax': 'bool', '*names': ['str'] }, 'returns': ['CommandInfo'] } where the normal {"execute":"qemu-commands"} just returns the list of command names, but {"execute":"qemu-commands", "arguments": { "syntax": "true", "names" : [ "blockdev-transaction" ] } } then returns: {"return":[{"name":"blockdev-transaction", "syntax":"{ 'command' ... }"}], "id":"..."} that is, return back the qapi-schema.json description of the command. Actually, I'd guess you'd also want to be able to query 'type' listings, not just 'command's, so maybe this deserves a new monitor command rather than shoe-horning it onto an existing one. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig83D90F3BE67DC988A6BDB06B 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.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPT+plAAoJEKeha0olJ0Nq7vQIAKNA3Qb2+TqW82QiMXnX/Gwg iXKinw4vJ6G88oz7i5HKd/ZHyMOuX2bEUhpptXHSHfwh2IQgO/fHu3wu/bRHxPW3 kLfMN1+JDRJXfoWlx1rIcZCSyml55iLcbLSweloiQIq10D9lFuhT+ja3S/ZnKdTQ Jm5Zex61GyqyYikwzYKpKF1P4Dg1m33M/AU5IH15iIT19A84rdCcKuUJme82tx2I eGHApMw8MRb40akoyhMgwhdUr30vr5cjeUQLOt3hLs5Gzc6dQ0m5dXzhjfidQwDm kvbXYNJl+kT+ssTOTfVJqZGFUvwUgQBWhBRP/4aA0odnMe+c09cF5am93yNlfkU= =/2U+ -----END PGP SIGNATURE----- --------------enig83D90F3BE67DC988A6BDB06B--