[PATCH 06/55] Revert "qemu: monitor: Add the 'query-nodes' argument for query-blockstats"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_block.c        | 2 +-
 src/qemu/qemu_monitor.c      | 8 ++------
 src/qemu/qemu_monitor.h      | 3 +--
 src/qemu/qemu_monitor_json.c | 9 +++------
 src/qemu/qemu_monitor_json.h | 3 +--
 5 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 66e6301210..509b0a5210 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -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;
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 6e0644221b..4f0bbc147d 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -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);
 }


diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 2fa8d5b51d..b8e3ca2ce1 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -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;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 2389ebb9aa..e20851eeb2 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -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++) {
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 2408ab0c5b..0458d81c0d 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -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);
-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux