]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix disk stats retrieval with QEMU >= 0.12
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 10 Feb 2010 17:46:44 +0000 (17:46 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 11 Feb 2010 12:07:23 +0000 (12:07 +0000)
commit7357975000ee5d545b5e66df0a1050906c79ed89
treea00041cdf9d6cb1390e063994ecc0225e058e011
parentd3024a2ccee8a236ea811d44f9c69349d639b94f
Fix disk stats retrieval with QEMU >= 0.12

With QEMU >= 0.12 the host and guest side of disks no longer have
the same naming convention. Specifically the host side will now
get a 'drive-' prefix added to its name. The 'info blockstats'
monitor command returns the host side name, so it is neccessary
to strip this off when looking up stats since libvirt stores the
guest side name !

* src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Move 'drive-' prefix
  string to a defined constant
* src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Strip
  off 'drive-' prefix (if found) when looking up disk stats
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c