From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoMNe-0004Y0-Nk for qemu-devel@nongnu.org; Wed, 04 Dec 2013 19:01:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoMNa-0002EL-9I for qemu-devel@nongnu.org; Wed, 04 Dec 2013 19:01:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:22997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoMNZ-0002Dz-Om for qemu-devel@nongnu.org; Wed, 04 Dec 2013 19:01:17 -0500 Message-ID: <529FC245.6070802@redhat.com> Date: Wed, 04 Dec 2013 17:01:09 -0700 From: Eric Blake MIME-Version: 1.0 References: <1386077165-19577-1-git-send-email-benoit@irqsave.net> <1386077165-19577-6-git-send-email-benoit@irqsave.net> In-Reply-To: <1386077165-19577-6-git-send-email-benoit@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CKv8EBv73SQF1UFA2FjsASSNpqQDw9GnJ" Subject: Re: [Qemu-devel] [RFC V3 5/7] qmp: Allow block_resize to manipulate bs graph nodes. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , qemu-devel@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com, famz@redhat.com, armbru@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CKv8EBv73SQF1UFA2FjsASSNpqQDw9GnJ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/03/2013 06:26 AM, Beno=C3=AEt Canet wrote: > Signed-off-by: Benoit Canet > --- > blockdev.c | 13 +++++++++---- > hmp.c | 2 +- > qapi-schema.json | 10 ++++++++-- > qmp-commands.hx | 3 ++- > 4 files changed, 20 insertions(+), 8 deletions(-) >=20 > diff --git a/blockdev.c b/blockdev.c > index aab370f..e314d62 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -1676,14 +1676,19 @@ int do_drive_del(Monitor *mon, const QDict *qdi= ct, QObject **ret_data) > return 0; > } > =20 > -void qmp_block_resize(const char *device, int64_t size, Error **errp) > +void qmp_block_resize(bool has_device, const char * device, > + bool has_node_name, const char * node_name, More style issues (I'll quit pointing them out). > +++ b/hmp.c > @@ -892,7 +892,7 @@ void hmp_block_resize(Monitor *mon, const QDict *qd= ict) > int64_t size =3D qdict_get_int(qdict, "size"); > Error *errp =3D NULL; > =20 > - qmp_block_resize(device, size, &errp); > + qmp_block_resize(true, device, false, NULL, size, &errp); Again, is the decision to hide this from HMP intentional? I can live with that, but it's probably worth documenting in the commit message. > # > -# @device: the name of the device to get the image resized > +# Either @device or @node-name must be set but not both. > +# > +# @device: #optional the name of the device to get the image resized > +# > +# @node-name: #optional graph node name to get the image resized (Sinc= e 1.8) 2.0 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --CKv8EBv73SQF1UFA2FjsASSNpqQDw9GnJ 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSn8JFAAoJEKeha0olJ0Nq8E4IAI4SlKapw2HwVJyXqeiVsgiv 3l3f6PMRmrzkm+uCUZgWFVmGT4bgNft+PuUG2Z5bPG6fCnl1qzsKV0IIyq5OdMjS kHhxnBKDwK2BJbeMwSXhwoezy1EzBNr7nl03GInrgHFXMRfElKsH635IEMwqMLYC TCgADv5CV1ZiOa8J/tuTec3eGv7xTvjoZQdb+PyXihVLSo43JH37La+frIAWyHav AKVq41whCZflwsc8fqaq4EOhS3Y5rawwgy0tqXKV4W1uZus3J1YuGp9Uudetf281 RbUZE9J2h/IXbeZcRQCZXBOToCIjCLg/bDXBkzwxziQm0NuQ1b7hq+5TYF2f37s= =+CoK -----END PGP SIGNATURE----- --CKv8EBv73SQF1UFA2FjsASSNpqQDw9GnJ--