From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKHh9-0005cG-9p for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:52:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKHh8-0001xx-1d for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:52:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKHh7-0001xq-OF for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:52:37 -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 q95NqaBN028843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Oct 2012 19:52:37 -0400 Message-ID: <506F72C3.5080304@redhat.com> Date: Fri, 05 Oct 2012 17:52:35 -0600 From: Eric Blake MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE1C9E659EB921320D18941ED" Subject: [Qemu-devel] RFC: making QMP query-block more useful List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers , Jeff Cody This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE1C9E659EB921320D18941ED Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Right now, 'query-block' has no way to filter to a single device, but conversely, for each device, it shows only the first backing file, rather than the entire backing chain. Jeff and I were lamenting this fact on IRC while debugging his block-commit stuff. Would it be worth enhancing the QMP to be: ## # @query-block: # # Get a list of BlockInfo for various virtual block devices. # # @devices: #optional If provided, limit the output to the given # device names (since 1.3) # # @recurse: #optional Provide recursive information on any backing # chains (since 1.3, default false) # # Returns: a list of @BlockInfo describing each virtual block device # # Since: 0.14.0 ## { 'command': 'query-block', 'arguments': { '*names': ['str'], 'recurse': 'bool' }, 'returns': ['BlockInfo'] } as well as enhancing BlockDeviceInfo to be self-recursive, by adding backing_chain as in: # @backing_chain: #optional, only present if @backing_file is present and 'query-block' requested recursion (since 1.3) { 'type': 'BlockDeviceInfo', 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str', '*backing_file': 'str', 'backing_file_depth': 'int', '*backing_chain' : 'BlockDeviceInfo', 'encrypted': 'bool', 'encryption_key_missing': 'bool', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} } Or would such modifications require the creation of a new QMP command, instead of altering 'query-block'? Likewise, can 'qemu-img info' be enhanced to add a recursion flag? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigE1C9E659EB921320D18941ED 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://www.enigmail.net/ iQEcBAEBCAAGBQJQb3LDAAoJEKeha0olJ0Nq9uEH/1bKzONSJJ36UNWJRvHTQs7W DzGk5k4x8v1MEJvU4vPPeuPgGqpelWcl+IhWjNuQ3sK6oBy03wzlDwkZ5ed6h1wf TNys2PZC+F38vcXM8fHff1wSJ9N3rSeLTChF3tZ27t/y+uOxQKPLJWI3SRPedz8/ eFlpLq61mPymYcGarW3EMz0FmqirQWhK+RHI41kd3oWd1TZoieGVreGZ42ZqVQgs AvnfHCfw358phJPXFJICloL9hnqjR6i9bAcapca/IhAAdcWioagpWxda45wWrQN4 yUtgl/nDgDA0SuiDo8gubwjQDK/zYzSh9qyvTbchm9w/SnXf3+Vx8a6/7MEKcAo= =umck -----END PGP SIGNATURE----- --------------enigE1C9E659EB921320D18941ED--