All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: QEMU Developers <qemu-devel@nongnu.org>, Jeff Cody <jcody@redhat.com>
Subject: [Qemu-devel] RFC: making QMP query-block more useful
Date: Fri, 05 Oct 2012 17:52:35 -0600	[thread overview]
Message-ID: <506F72C3.5080304@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

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?

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 617 bytes --]

             reply	other threads:[~2012-10-05 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 23:52 Eric Blake [this message]
2012-10-08 11:02 ` [Qemu-devel] RFC: making QMP query-block more useful Daniel P. Berrange
2012-10-09 13:24   ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=506F72C3.5080304@redhat.com \
    --to=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.