mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemuMonitorJSONBlockStatsUpdateCapacityBlockdev: Use 'flat' mode of query-named-block-nodes
'query-named-block-nodes' in non-flat mode returns redundantly nested data under the 'backing-image' field. Fortunately we don't need it when updating the capacity stats. This function was unfortunately not fixed originally when the support for flat mode was added. Use the flat cached in the monitor object to force flat mode if available. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b0e4ad5263
commit
bbd4d48993
@ -2503,7 +2503,7 @@ qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon,
|
||||
{
|
||||
g_autoptr(virJSONValue) nodes = NULL;
|
||||
|
||||
if (!(nodes = qemuMonitorJSONQueryNamedBlockNodes(mon, false)))
|
||||
if (!(nodes = qemuMonitorJSONQueryNamedBlockNodes(mon, mon->queryNamedBlockNodesFlat)))
|
||||
return -1;
|
||||
|
||||
if (virJSONValueArrayForeachSteal(nodes,
|
||||
|
Loading…
Reference in New Issue
Block a user