mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Revert "qemu: monitor: Add the 'query-nodes' argument for query-blockstats"
Turns out that 'query-nodes' is not what we want and the 'query-blockstats' command was in fact buggy. Revert the new field since it's not needed. This reverts commit 50edca1331298bfcb2622e8fe588d493aff9ab68. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
70644a8ba2
commit
8b5c8ecc0b
@ -358,7 +358,7 @@ qemuBlockNodeNamesDetect(virQEMUDriverPtr driver,
|
||||
return -1;
|
||||
|
||||
data = qemuMonitorQueryNamedBlockNodes(qemuDomainGetMonitor(vm));
|
||||
blockstats = qemuMonitorQueryBlockstats(qemuDomainGetMonitor(vm), false);
|
||||
blockstats = qemuMonitorQueryBlockstats(qemuDomainGetMonitor(vm));
|
||||
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || !data || !blockstats)
|
||||
goto cleanup;
|
||||
|
@ -2243,19 +2243,15 @@ qemuMonitorGetBlockInfo(qemuMonitorPtr mon)
|
||||
/**
|
||||
* qemuMonitorQueryBlockstats:
|
||||
* @mon: monitor object
|
||||
* @nodenames: include backing chain nodes with explicitly specified name
|
||||
*
|
||||
* Returns data from a call to 'query-blockstats'.
|
||||
*/
|
||||
virJSONValuePtr
|
||||
qemuMonitorQueryBlockstats(qemuMonitorPtr mon,
|
||||
bool nodenames)
|
||||
qemuMonitorQueryBlockstats(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
|
||||
VIR_DEBUG("nodenames: %d", nodenames);
|
||||
|
||||
return qemuMonitorJSONQueryBlockstats(mon, nodenames);
|
||||
return qemuMonitorJSONQueryBlockstats(mon);
|
||||
}
|
||||
|
||||
|
||||
|
@ -563,8 +563,7 @@ int qemuMonitorSetMemoryStatsPeriod(qemuMonitorPtr mon,
|
||||
int qemuMonitorBlockIOStatusToError(const char *status);
|
||||
virHashTablePtr qemuMonitorGetBlockInfo(qemuMonitorPtr mon);
|
||||
|
||||
virJSONValuePtr qemuMonitorQueryBlockstats(qemuMonitorPtr mon,
|
||||
bool nodenames);
|
||||
virJSONValuePtr qemuMonitorQueryBlockstats(qemuMonitorPtr mon);
|
||||
|
||||
typedef struct _qemuBlockStats qemuBlockStats;
|
||||
typedef qemuBlockStats *qemuBlockStatsPtr;
|
||||
|
@ -2362,16 +2362,13 @@ qemuMonitorJSONGetOneBlockStatsInfo(virJSONValuePtr dev,
|
||||
|
||||
|
||||
virJSONValuePtr
|
||||
qemuMonitorJSONQueryBlockstats(qemuMonitorPtr mon,
|
||||
bool nodenames)
|
||||
qemuMonitorJSONQueryBlockstats(qemuMonitorPtr mon)
|
||||
{
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
virJSONValuePtr ret = NULL;
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("query-blockstats",
|
||||
"B:query-nodes", nodenames,
|
||||
NULL)))
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("query-blockstats", NULL)))
|
||||
return NULL;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
@ -2400,7 +2397,7 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitorPtr mon,
|
||||
size_t i;
|
||||
virJSONValuePtr devices;
|
||||
|
||||
if (!(devices = qemuMonitorJSONQueryBlockstats(mon, false)))
|
||||
if (!(devices = qemuMonitorJSONQueryBlockstats(mon)))
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < virJSONValueArraySize(devices); i++) {
|
||||
|
@ -86,8 +86,7 @@ int qemuMonitorJSONSetMemoryStatsPeriod(qemuMonitorPtr mon,
|
||||
int qemuMonitorJSONGetBlockInfo(qemuMonitorPtr mon,
|
||||
virHashTablePtr table);
|
||||
|
||||
virJSONValuePtr qemuMonitorJSONQueryBlockstats(qemuMonitorPtr mon,
|
||||
bool nodenames);
|
||||
virJSONValuePtr qemuMonitorJSONQueryBlockstats(qemuMonitorPtr mon);
|
||||
int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitorPtr mon,
|
||||
virHashTablePtr hash,
|
||||
bool backingChain);
|
||||
|
Loading…
x
Reference in New Issue
Block a user