From: Peter Krempa <[email protected]> Use 'qemuDomainStorageSourceProbeSize' instead of 'qemuDomainStorageUpdatePhysical'.
Signed-off-by: Peter Krempa <[email protected]> --- src/qemu/qemu_driver.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bcafacfb60..e37c852c98 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10803,12 +10803,14 @@ qemuDomainGetBlockInfo(virDomainPtr dom, * value for this API. NB: May still be 0 for block. */ if (entry->physical == 0 || info->allocation == 0 || info->allocation == entry->physical) { + unsigned long long physical; + if (info->allocation == 0) info->allocation = entry->physical; - if (qemuDomainStorageUpdatePhysical(cfg, vm, disk->src) == 0) { - VIR_DEBUG("updating physical disk size to '%llu'", disk->src->physical); - info->physical = disk->src->physical; + if (qemuDomainStorageSourceProbeSize(cfg, vm, disk->src, NULL, NULL, &physical) == 0) { + VIR_DEBUG("updating physical disk size to '%llu'", physical); + info->physical = physical; } else { info->physical = entry->physical; } -- 2.54.0
