]> git.ipfire.org Git - thirdparty/libvirt.git/commit
getstats: prepare for dynamic block.count stat
authorEric Blake <eblake@redhat.com>
Fri, 5 Dec 2014 23:19:00 +0000 (16:19 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 17 Dec 2014 07:20:21 +0000 (00:20 -0700)
commit14ef1f62e3429face36ac1e6f5665e97e53a328d
tree831e4fbe49fb9a8d51b81b7e608665b0f8622670
parent596a13713420e01b20ce3dc3fdbe06d073682675
getstats: prepare for dynamic block.count stat

A coming patch will make it optionally possible to list backing
chain block stats; in this mode of operation, block.counts is no
longer the number of <disks> in the domain, but the number of
blocks in the array being reported.  We still want block.count
listed first, but rather than iterate the tree twice (once to
count, and once to list stats), it's easier to just touch things
up after the fact.

* src/qemu/qemu_driver.c (qemuDomainGetStatsBlock): Compute count
after the fact.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c