From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu6ml-0003tX-AH for qemu-devel@nongnu.org; Tue, 02 Jul 2013 16:02:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uu6mj-0004ji-Dy for qemu-devel@nongnu.org; Tue, 02 Jul 2013 16:02:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu6jB-00036a-2o for qemu-devel@nongnu.org; Tue, 02 Jul 2013 15:59:05 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r62Jx4Nl005103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Jul 2013 15:59:04 -0400 Message-ID: <51D33106.8010502@redhat.com> Date: Tue, 02 Jul 2013 13:59:02 -0600 From: Eric Blake MIME-Version: 1.0 References: <1372744789-997-1-git-send-email-famz@redhat.com> <1372744789-997-7-git-send-email-famz@redhat.com> In-Reply-To: <1372744789-997-7-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2XRAMRUHNMIVMVWOJRWUI" Subject: Re: [Qemu-devel] [PATCH 6/7] block: add target-id option to drive-backup QMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, obarenbo@redhat.com, armbru@redhat.com, roliveri@redhat.com, hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com, pmyers@redhat.com, imain@redhat.com, stefanha@redhat.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2XRAMRUHNMIVMVWOJRWUI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/01/2013 11:59 PM, Fam Zheng wrote: > Add target-id (optional) to drive-backup command, to make the target bs= > a named drive so that we can operate on it (e.g. export with NBD). >=20 > Signed-off-by: Fam Zheng > --- > blockdev.c | 4 +++- > qapi-schema.json | 7 +++++-- > qmp-commands.hx | 3 ++- > 3 files changed, 10 insertions(+), 4 deletions(-) >=20 > +++ b/qapi-schema.json > @@ -1654,7 +1654,8 @@ > # Since: 1.6 > ## > { 'type': 'DriveBackup', > - 'data': { 'device': 'str', 'target': 'str', '*format': 'str', > + 'data': { 'device': 'str', 'target': 'str', > + '*target-id': 'str', '*format': 'str', Seems undocumented... > '*mode': 'NewImageMode', '*speed': 'int', > '*on-source-error': 'BlockdevOnError', > '*on-target-error': 'BlockdevOnError' } } > @@ -1807,6 +1808,7 @@ > # is a device, the existing file/device will be used as the n= ew > # destination. If it does not exist, a new file will be crea= ted. > # > +# @target-id: #optional the drive id of the target. =2E..until I read this. Hmm, I think we should first consolidate things for DriveBackup (so that documentation is listed only once, prior to the DriveBackup 'type' declaration), by rebasing things on top of in the same was as Kevin's series "[PATCH v3 0/3] qapi: Top-level type reference for command definitions" does for BlockdevSnapshot. The documentation is not incorrect, but it also isn't very helpful - what is the "drive id of the target" and when would I want to set it? What do I gain by overriding the drive id, and what is the default behavior when I don't pass in the option? > +++ b/qmp-commands.hx > @@ -913,7 +913,7 @@ EQMP > =20 > { > .name =3D "drive-backup", > - .args_type =3D "device:B,target:s,speed:i?,mode:s?,format:s?,= " > + .args_type =3D "device:B,target:s,target-id:s?,speed:i?,mode:= s?,format:s?," > "on-source-error:s?,on-target-error:s?", > .mhandler.cmd_new =3D qmp_marshal_input_drive_backup, > }, > @@ -936,6 +936,7 @@ Arguments: > device, the existing file/device will be used as the new > destination. If it does not exist, a new file will be cre= ated. > (json-string) > +- "target-id": the drive id of the target image. Should probably mention (json-string, optional), as done elsewhere in this command. > - "format": the format of the new destination, default is to probe if = 'mode' is > 'existing', else the format of the source > (json-string, optional) >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2XRAMRUHNMIVMVWOJRWUI 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR0zEGAAoJEKeha0olJ0NqifwH/3Kfzhklowq47uKpJFLb4+Cc gmNNvfw7eF0eV9UvKWS/Xv50KzA5Te2pYPruP8AFqnMAWENie64fYMChnVl47WWP 0CjoCoDuxGa63VccyHCUx3Zv6PWsZHhMcKRls2V1e+4v5bDyakazAmZjfurmeTnN IJDOFFKxDJbBmRmT1AFPHzLEiL1VRyPwNJWdVBLbJi968Hg4zx8h7aweF8GqS6ff x0qZovY/LTVRXKomlFoQJGoe3V+YqWEqorej9m/8omPh2YWAXCNC8jHCkhcLllF4 avkHuEi60WgmdDEnou4ytVFqJ55MsnMTR+S8+ddfBDYA2C5eJqnkbD4s9oudM3I= =i9oU -----END PGP SIGNATURE----- ------enig2XRAMRUHNMIVMVWOJRWUI--