• E
    getstats: add block.n.path stat · 7b499262
    Eric Blake 提交于
    I'm about to make block stats optionally more complex to cover
    backing chains, where block.count will no longer equal the number
    of <disks> for a domain.  For these reasons, it is nicer if the
    statistics output includes the source path (for local files).
    This patch doesn't add anything for network disks, although we
    may decide to add that later.
    
    With this patch, I now see the following for the same domain as
    in the previous patch (one qcow2 file, and an empty cdrom drive):
    $ virsh domstats --block foo
    Domain: 'foo'
      block.count=2
      block.0.name=hda
      block.0.path=/var/lib/libvirt/images/foo.qcow2
      block.1.name=hdc
    
    * src/libvirt-domain.c (virConnectGetAllDomainStats): Document
    new field.
    * tools/virsh.pod (domstats): Document new field.
    * src/qemu/qemu_driver.c (qemuDomainGetStatsBlock): Return the new
    stat for local files/block devices.
    (QEMU_ADD_NAME_PARAM): Add parameter.
    (qemuDomainGetStatsInterface): Update caller.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    7b499262
qemu_driver.c 611.6 KB