On Thu, Oct 15, 2015 at 16:43:54 -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1249981
...
> ---
> src/qemu/qemu_command.c | 19 +++++------
> src/qemu/qemu_process.c | 26 ++++++++++++++-
> .../qemuxml2argv-cputune-numatune.args | 1 +
> .../qemuxml2argv-iothreads-nocap.xml | 37
> ++++++++++++++++++++++
> tests/qemuxml2argvtest.c | 2 ++
> 5 files changed, 73 insertions(+), 12 deletions(-)
> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-nocap.xml
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index f99e363..ae04a69 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
[...]
> @@ -9462,8 +9454,13 @@ qemuBuildCommandLine(virConnectPtr conn,
> virCommandAddArg(cmd, smp);
> VIR_FREE(smp);
>
> - if (def->niothreadids > 0 &&
> - virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) {
> + if (def->niothreadids &&
> + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) {
This case can be folded ...
> + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> + _("IOThreads not supported for this QEMU"));
> + goto error;
> + }
> + if (def->niothreadids) {
... here so that you don't have to test def->niothreadids twice in 6
lines of code where it can't change.
> /* Create iothread objects using the defined iothreadids list
> * and the defined id and name from the list. These may be used
> * by a disk definition which will associate to an iothread by
ACK with the above stuff optimized.
Peter
signature.asc
Description: Digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
