• E
    getstats: start giving offline block stats · 56b21dfe
    Eric Blake 提交于
    I noticed that for an offline domain, 'virsh domstats --block $dom'
    was producing just the domain name, with no stats.  But the older
    'virsh domblkinfo' works just fine on offline domains.  This patch
    starts to get us closer, by at least reporting the disk names for
    an offline domain.
    
    With this patch, I now see the following for an offline domain
    with one qcow2 disk and an empty cdrom drive:
    $ virsh domstats --block foo
    Domain: 'foo'
      block.count=2
      block.0.name=hda
      block.1.name=hdc
    
    * src/qemu/qemu_driver.c (qemuDomainGetStatsBlock): Don't short-circuit
    output of block name.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    56b21dfe
qemu_driver.c 611.4 KB