mirror of https://gitee.com/openkylin/libvirt.git
qemu_monitor: Fix regression in getting disk capacity
In dbf990fd31
the qemuMonitorJSONBlockStatsUpdateCapacityOne()
was split. However, due to a bug the return value was never set
to something meaningful.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9e66ecb5ea
commit
3bb75024da
|
@ -2492,14 +2492,15 @@ qemuMonitorJSONBlockStatsUpdateCapacityOne(virJSONValuePtr image,
|
|||
goto cleanup;
|
||||
|
||||
if (backingChain &&
|
||||
(backing = virJSONValueObjectGetObject(image, "backing-image"))) {
|
||||
ret = qemuMonitorJSONBlockStatsUpdateCapacityOne(backing,
|
||||
dev_name,
|
||||
depth + 1,
|
||||
stats,
|
||||
true);
|
||||
}
|
||||
(backing = virJSONValueObjectGetObject(image, "backing-image")) &&
|
||||
qemuMonitorJSONBlockStatsUpdateCapacityOne(backing,
|
||||
dev_name,
|
||||
depth + 1,
|
||||
stats,
|
||||
true) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
VIR_FREE(entry_name);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue