]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Fix reporting of physical capacity for block devices
authorPeter Krempa <pkrempa@redhat.com>
Fri, 7 Aug 2015 09:01:49 +0000 (11:01 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 7 Aug 2015 11:28:50 +0000 (13:28 +0200)
commit8dc27259255b79758367789ed272e909bdb56735
tree3e9f05472344b09f6fb5d76cd9ddae6efad4e8e3
parente3810db34f1acb74dfcfd69219930e23a30284f6
qemu: Fix reporting of physical capacity for block devices

Qemu reports physical size 0 for block devices. As 15fa84acbb55ebfee6a4
changed the behavior of qemuDomainGetBlockInfo to just query the monitor
this created a regression since we didn't report the size correctly any
more.

This patch adds code to refresh the physical size of a block device by
opening it and seeking to the end and uses it both in
qemuDomainGetBlockInfo and also in qemuDomainGetStatsOneBlock that was
broken since it was introduced in this respect.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1250982
src/libvirt_private.syms
src/qemu/qemu_driver.c
src/util/virstoragefile.c
src/util/virstoragefile.h