mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
qemu: monitor: Remove 'supportMaxOptions' argument from qemuMonitorGetBlockIoThrottle
The caller is already aware that the params are missing and the extractor is ignoring the missing ones so the parameter isn't necessary.
This commit is contained in:
parent
77298458d0
commit
2fde4e724e
@ -17852,7 +17852,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
|||||||
if (!(device = qemuAliasFromDisk(disk)))
|
if (!(device = qemuAliasFromDisk(disk)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorGetBlockIoThrottle(priv->mon, device, &reply, supportMaxOptions);
|
ret = qemuMonitorGetBlockIoThrottle(priv->mon, device, &reply);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -3126,15 +3126,14 @@ qemuMonitorSetBlockIoThrottle(qemuMonitorPtr mon,
|
|||||||
int
|
int
|
||||||
qemuMonitorGetBlockIoThrottle(qemuMonitorPtr mon,
|
qemuMonitorGetBlockIoThrottle(qemuMonitorPtr mon,
|
||||||
const char *device,
|
const char *device,
|
||||||
virDomainBlockIoTuneInfoPtr reply,
|
virDomainBlockIoTuneInfoPtr reply)
|
||||||
bool supportMaxOptions)
|
|
||||||
{
|
{
|
||||||
VIR_DEBUG("device=%p, reply=%p", device, reply);
|
VIR_DEBUG("device=%p, reply=%p", device, reply);
|
||||||
|
|
||||||
QEMU_CHECK_MONITOR(mon);
|
QEMU_CHECK_MONITOR(mon);
|
||||||
|
|
||||||
if (mon->json)
|
if (mon->json)
|
||||||
return qemuMonitorJSONGetBlockIoThrottle(mon, device, reply, supportMaxOptions);
|
return qemuMonitorJSONGetBlockIoThrottle(mon, device, reply);
|
||||||
else
|
else
|
||||||
return qemuMonitorTextGetBlockIoThrottle(mon, device, reply);
|
return qemuMonitorTextGetBlockIoThrottle(mon, device, reply);
|
||||||
}
|
}
|
||||||
|
@ -804,8 +804,7 @@ int qemuMonitorSetBlockIoThrottle(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
int qemuMonitorGetBlockIoThrottle(qemuMonitorPtr mon,
|
int qemuMonitorGetBlockIoThrottle(qemuMonitorPtr mon,
|
||||||
const char *device,
|
const char *device,
|
||||||
virDomainBlockIoTuneInfoPtr reply,
|
virDomainBlockIoTuneInfoPtr reply);
|
||||||
bool supportMaxOptions);
|
|
||||||
|
|
||||||
int qemuMonitorSystemWakeup(qemuMonitorPtr mon);
|
int qemuMonitorSystemWakeup(qemuMonitorPtr mon);
|
||||||
|
|
||||||
|
@ -4499,8 +4499,7 @@ int qemuMonitorJSONOpenGraphics(qemuMonitorPtr mon,
|
|||||||
static int
|
static int
|
||||||
qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
|
qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
|
||||||
const char *device,
|
const char *device,
|
||||||
virDomainBlockIoTuneInfoPtr reply,
|
virDomainBlockIoTuneInfoPtr reply)
|
||||||
bool supportMaxOptions)
|
|
||||||
{
|
{
|
||||||
virJSONValuePtr io_throttle;
|
virJSONValuePtr io_throttle;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -4549,15 +4548,13 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
|
|||||||
GET_THROTTLE_STATS("iops", total_iops_sec);
|
GET_THROTTLE_STATS("iops", total_iops_sec);
|
||||||
GET_THROTTLE_STATS("iops_rd", read_iops_sec);
|
GET_THROTTLE_STATS("iops_rd", read_iops_sec);
|
||||||
GET_THROTTLE_STATS("iops_wr", write_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_max", total_bytes_sec_max);
|
GET_THROTTLE_STATS_OPTIONAL("bps_rd_max", read_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("bps_wr_max", write_bytes_sec_max);
|
GET_THROTTLE_STATS_OPTIONAL("iops_max", total_iops_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_rd_max", read_iops_sec_max);
|
GET_THROTTLE_STATS_OPTIONAL("iops_wr_max", write_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("iops_size", size_iops_sec);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4643,8 +4640,7 @@ int qemuMonitorJSONSetBlockIoThrottle(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
|
int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
|
||||||
const char *device,
|
const char *device,
|
||||||
virDomainBlockIoTuneInfoPtr reply,
|
virDomainBlockIoTuneInfoPtr reply)
|
||||||
bool supportMaxOptions)
|
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
virJSONValuePtr cmd = NULL;
|
virJSONValuePtr cmd = NULL;
|
||||||
@ -4670,7 +4666,7 @@ int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = qemuMonitorJSONBlockIoThrottleInfo(result, device, reply, supportMaxOptions);
|
ret = qemuMonitorJSONBlockIoThrottleInfo(result, device, reply);
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(result);
|
virJSONValueFree(result);
|
||||||
|
@ -328,8 +328,7 @@ int qemuMonitorJSONSetBlockIoThrottle(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
|
int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
|
||||||
const char *device,
|
const char *device,
|
||||||
virDomainBlockIoTuneInfoPtr reply,
|
virDomainBlockIoTuneInfoPtr reply);
|
||||||
bool supportMaxOptions);
|
|
||||||
|
|
||||||
int qemuMonitorJSONSystemWakeup(qemuMonitorPtr mon);
|
int qemuMonitorJSONSystemWakeup(qemuMonitorPtr mon);
|
||||||
|
|
||||||
|
@ -1882,7 +1882,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (qemuMonitorJSONGetBlockIoThrottle(qemuMonitorTestGetMonitor(test),
|
if (qemuMonitorJSONGetBlockIoThrottle(qemuMonitorTestGetMonitor(test),
|
||||||
"drive-virtio-disk0", &info, true) < 0)
|
"drive-virtio-disk0", &info) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (memcmp(&info, &expectedInfo, sizeof(info)) != 0) {
|
if (memcmp(&info, &expectedInfo, sizeof(info)) != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user