mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: Remove iothread 'poll-' value validation
QEMU accepts even values bigger than INT_MAX. The reasoning for these checks was that the QAPI definition declares them as 'int', but in QAPI terms that's any number as it's JSON. Remove the validation as well as the comment misinterpreting the QAPI definiton. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e094d21004
commit
6d8dcc644c
@ -5234,27 +5234,6 @@ qemuDomainIOThreadParseParams(virTypedParameterPtr params,
|
||||
if (rc == 1)
|
||||
iothread->set_thread_pool_max = true;
|
||||
|
||||
if (iothread->set_poll_max_ns && iothread->poll_max_ns > INT_MAX) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("poll-max-ns (%1$llu) must be less than or equal to %2$d"),
|
||||
iothread->poll_max_ns, INT_MAX);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (iothread->set_poll_grow && iothread->poll_grow > INT_MAX) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("poll-grow (%1$u) must be less than or equal to %2$d"),
|
||||
iothread->poll_grow, INT_MAX);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (iothread->set_poll_shrink && iothread->poll_shrink > INT_MAX) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("poll-shrink (%1$u) must be less than or equal to %2$d"),
|
||||
iothread->poll_shrink, INT_MAX);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (iothread->set_thread_pool_min && iothread->thread_pool_min < -1) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("thread_pool_min (%1$d) must be equal to or greater than -1"),
|
||||
|
@ -7128,13 +7128,6 @@ qemuMonitorJSONGetIOThreads(qemuMonitor *mon,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Fetch poll values (since QEMU 2.9 ) if available. QEMU
|
||||
* stores these values as int64_t's; however, the qapi type
|
||||
* is an int. The qapi/misc.json also mis-describes the grow
|
||||
* and shrink values as pure add/remove values. The source
|
||||
* util/aio-posix.c function aio_poll uses them as a factor
|
||||
* or divisor in it's calculation. We will fetch and store
|
||||
* them as defined in our structures. */
|
||||
if (virJSONValueObjectGetNumberUlong(child, "poll-max-ns",
|
||||
&info->poll_max_ns) == 0 &&
|
||||
virJSONValueObjectGetNumberUint(child, "poll-grow",
|
||||
|
Loading…
Reference in New Issue
Block a user