From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxeJY-0003sK-4N for qemu-devel@nongnu.org; Fri, 12 Jul 2013 10:27:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxeJT-0004a8-Rc for qemu-devel@nongnu.org; Fri, 12 Jul 2013 10:27:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxeJT-0004Zq-GL for qemu-devel@nongnu.org; Fri, 12 Jul 2013 10:27:11 -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 r6CERA5D014600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 12 Jul 2013 10:27:10 -0400 Message-ID: <51E0123D.2000203@redhat.com> Date: Fri, 12 Jul 2013 08:27:09 -0600 From: Eric Blake MIME-Version: 1.0 References: <1373363617-4723-1-git-send-email-kwolf@redhat.com> <1373363617-4723-12-git-send-email-kwolf@redhat.com> <51DF3592.7060909@redhat.com> <20130712094029.GB2533@dhcp-200-207.str.redhat.com> In-Reply-To: <20130712094029.GB2533@dhcp-200-207.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2BMTMNDRJOPNQPNANTEXX" Subject: Re: [Qemu-devel] [RFC PATCH 11/11] [WIP] block: Implement 'blockdev-add' QMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2BMTMNDRJOPNQPNANTEXX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/12/2013 03:40 AM, Kevin Wolf wrote: >>> + >>> +{ 'command': 'blockdev-add', 'data': { 'options': 'BlockOptions' } }= >> >> Sounds nice - and seems like it should be easy enough to extend BlockR= ef >> and/or BlockOptions to have a way to pass an fd even for backing files= , >> getting to (my) end goal of using fd passing to get SELinux labeling f= or >> NFS files out of the box from libvirt. >=20 > In fact, I think it might be a schema-only patch at this point. :-) >=20 >> Should this command return anything? For example, returning a >> BlockDeviceInfo (with its recursive listing of the entire backing chai= n) >> might be useful to check that qemu's view of the world matches what th= e >> caller passed in. Particularly important if we are able to let the us= er >> choose whether to pass the full chain or to just pass the top-most ima= ge >> and let qemu chase down the metadata in that image to open additional >> files for the rest of the chain. >=20 > Does it matter for you to have this immediately as a return value from > blockdev-add, or wouldn't a following query-block on this device achiev= e > the same? Yeah, that will probably work. We have a couple *-add that return useful values, but that was so we didn't have to introduce a separate query at the time. But here, we already have the query, and for a deeply nested struct, that's a lot of information to generate for callers that don't care, and callers that do care can do a double call. >=20 > I'm not against adding a return value when it's useful, but I don't thi= nk > we should just return arbitrary query-* results if we can't think of > anything else to return. It should always be possible to upgrade from {} to actual struct contents in a later release, should the need arise. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2BMTMNDRJOPNQPNANTEXX 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/ iQEcBAEBCAAGBQJR4BI9AAoJEKeha0olJ0NqNzUH/331ezBAkWrdbWzcCutAxd9Y D5aqXDPt0gsZT40Ny3l5OzEF+/H9CBz7sxgRvac3ELrDVdzzB/ii664yburpd3ei ZwGq9laVF1surUcAO5ADnNfGHNSN1bk9xXOnqZib4sN9cWXek0fStXXgIizoGn8r qoXr4otl4GRir43go5RxnV8kD7ySwxA5uW0tSwGBlXHVKUfnYXU6uNm7atilQpvb tUA5ulb1baZmvNNpmPYl+75B3TV9EDJUabV5rSq1qZKF3zBwAesFdfsjor0eV5Ga bEctUlxQfFH1R0VdNVB2DGZaN6vITLHZfOijDXqirMAOM6FhutTtpnU33I8P8jY= =O0Od -----END PGP SIGNATURE----- ------enig2BMTMNDRJOPNQPNANTEXX--