]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: monitor: Remove 'supportMaxOptions' argument from qemuMonitorGetBlockIoThrottle
authorPeter Krempa <pkrempa@redhat.com>
Fri, 20 May 2016 06:30:45 +0000 (08:30 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 May 2016 14:59:58 +0000 (16:59 +0200)
The caller is already aware that the params are missing and the
extractor is ignoring the missing ones so the parameter isn't necessary.

src/qemu/qemu_driver.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h
tests/qemumonitorjsontest.c

index ec2742cde03a38d19075fdb0fc2afd15a4a78e6a..af42c8d4e29687945cee030e16ad84577da75eae 100644 (file)
@@ -17852,7 +17852,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
         if (!(device = qemuAliasFromDisk(disk)))
             goto endjob;
         qemuDomainObjEnterMonitor(driver, vm);
-        ret = qemuMonitorGetBlockIoThrottle(priv->mon, device, &reply, supportMaxOptions);
+        ret = qemuMonitorGetBlockIoThrottle(priv->mon, device, &reply);
         if (qemuDomainObjExitMonitor(driver, vm) < 0)
             goto endjob;
         if (ret < 0)
index a0060ccefb12197ff39fabfa53687974c0e6d059..597307f7cdd6411baf6f5bb0e90b8838cff33ce7 100644 (file)
@@ -3126,15 +3126,14 @@ qemuMonitorSetBlockIoThrottle(qemuMonitorPtr mon,
 int
 qemuMonitorGetBlockIoThrottle(qemuMonitorPtr mon,
                               const char *device,
-                              virDomainBlockIoTuneInfoPtr reply,
-                              bool supportMaxOptions)
+                              virDomainBlockIoTuneInfoPtr reply)
 {
     VIR_DEBUG("device=%p, reply=%p", device, reply);
 
     QEMU_CHECK_MONITOR(mon);
 
     if (mon->json)
-        return qemuMonitorJSONGetBlockIoThrottle(mon, device, reply, supportMaxOptions);
+        return qemuMonitorJSONGetBlockIoThrottle(mon, device, reply);
     else
         return qemuMonitorTextGetBlockIoThrottle(mon, device, reply);
 }
index a1cbc94a6ff8eefe54d7d683d71984a322d272b8..dd3587f493eb74d5ab8b92fb50f9cbbbab654363 100644 (file)
@@ -804,8 +804,7 @@ int qemuMonitorSetBlockIoThrottle(qemuMonitorPtr mon,
 
 int qemuMonitorGetBlockIoThrottle(qemuMonitorPtr mon,
                                   const char *device,
-                                  virDomainBlockIoTuneInfoPtr reply,
-                                  bool supportMaxOptions);
+                                  virDomainBlockIoTuneInfoPtr reply);
 
 int qemuMonitorSystemWakeup(qemuMonitorPtr mon);
 
index 0508fe6d0c3b960a56d853c5c5429951bbad82ca..64827c342ddd72cee13db7e5518dc2457912952d 100644 (file)
@@ -4499,8 +4499,7 @@ int qemuMonitorJSONOpenGraphics(qemuMonitorPtr mon,
 static int
 qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
                                    const char *device,
-                                   virDomainBlockIoTuneInfoPtr reply,
-                                   bool supportMaxOptions)
+                                   virDomainBlockIoTuneInfoPtr reply)
 {
     virJSONValuePtr io_throttle;
     int ret = -1;
@@ -4549,15 +4548,13 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
         GET_THROTTLE_STATS("iops", total_iops_sec);
         GET_THROTTLE_STATS("iops_rd", read_iops_sec);
         GET_THROTTLE_STATS("iops_wr", write_iops_sec);
-        if (supportMaxOptions) {
-            GET_THROTTLE_STATS_OPTIONAL("bps_max", total_bytes_sec_max);
-            GET_THROTTLE_STATS_OPTIONAL("bps_rd_max", read_bytes_sec_max);
-            GET_THROTTLE_STATS_OPTIONAL("bps_wr_max", write_bytes_sec_max);
-            GET_THROTTLE_STATS_OPTIONAL("iops_max", total_iops_sec_max);
-            GET_THROTTLE_STATS_OPTIONAL("iops_rd_max", read_iops_sec_max);
-            GET_THROTTLE_STATS_OPTIONAL("iops_wr_max", write_iops_sec_max);
-            GET_THROTTLE_STATS_OPTIONAL("iops_size", size_iops_sec);
-        }
+        GET_THROTTLE_STATS_OPTIONAL("bps_max", total_bytes_sec_max);
+        GET_THROTTLE_STATS_OPTIONAL("bps_rd_max", read_bytes_sec_max);
+        GET_THROTTLE_STATS_OPTIONAL("bps_wr_max", write_bytes_sec_max);
+        GET_THROTTLE_STATS_OPTIONAL("iops_max", total_iops_sec_max);
+        GET_THROTTLE_STATS_OPTIONAL("iops_rd_max", read_iops_sec_max);
+        GET_THROTTLE_STATS_OPTIONAL("iops_wr_max", write_iops_sec_max);
+        GET_THROTTLE_STATS_OPTIONAL("iops_size", size_iops_sec);
 
         break;
     }
@@ -4643,8 +4640,7 @@ int qemuMonitorJSONSetBlockIoThrottle(qemuMonitorPtr mon,
 
 int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
                                       const char *device,
-                                      virDomainBlockIoTuneInfoPtr reply,
-                                      bool supportMaxOptions)
+                                      virDomainBlockIoTuneInfoPtr reply)
 {
     int ret = -1;
     virJSONValuePtr cmd = NULL;
@@ -4670,7 +4666,7 @@ int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    ret = qemuMonitorJSONBlockIoThrottleInfo(result, device, reply, supportMaxOptions);
+    ret = qemuMonitorJSONBlockIoThrottleInfo(result, device, reply);
  cleanup:
     virJSONValueFree(cmd);
     virJSONValueFree(result);
index 95bba699b69469e25d6ee8f0b51732b2b22dfb49..76758dbfed40029255c181cca7b93a4257cc683a 100644 (file)
@@ -328,8 +328,7 @@ int qemuMonitorJSONSetBlockIoThrottle(qemuMonitorPtr mon,
 
 int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
                                       const char *device,
-                                      virDomainBlockIoTuneInfoPtr reply,
-                                      bool supportMaxOptions);
+                                      virDomainBlockIoTuneInfoPtr reply);
 
 int qemuMonitorJSONSystemWakeup(qemuMonitorPtr mon);
 
index 87b1a8f4aea9b6e1699efbbf45513812f575351d..819f7ce3c40e77dd69613a7317dd1ec360883c3e 100644 (file)
@@ -1882,7 +1882,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
         goto cleanup;
 
     if (qemuMonitorJSONGetBlockIoThrottle(qemuMonitorTestGetMonitor(test),
-                                          "drive-virtio-disk0", &info, true) < 0)
+                                          "drive-virtio-disk0", &info) < 0)
         goto cleanup;
 
     if (memcmp(&info, &expectedInfo, sizeof(info)) != 0) {