[libvirt] [PATCH] Added capability checking for block <iotune> setting.
Eric Blake
eblake at redhat.com
Wed Jan 18 16:13:44 UTC 2012
On 01/18/2012 09:01 AM, Martin Kletzander wrote:
> There was missing capability for blkiotune and thus specifying these
> settings caused libvirt to run qemu with invalid parameters and then
> reporting qemu error instead of the standard libvirt one.
> ---
> src/qemu/qemu_capabilities.c | 6 ++++++
> src/qemu/qemu_capabilities.h | 2 ++
> src/qemu/qemu_command.c | 13 +++++++++++++
> tests/qemuxml2argvtest.c | 2 +-
> 4 files changed, 22 insertions(+), 1 deletions(-)
>
> @@ -1031,6 +1033,10 @@ qemuCapsComputeCmdFlags(const char *help,
> qemuCapsSet(flags, QEMU_CAPS_DRIVE_AIO);
> if (strstr(help, "copy-on-read=on|off"))
> qemuCapsSet(flags, QEMU_CAPS_DRIVE_COPY_ON_READ);
> + if (strstr(help, "bps=") && strstr(help, "iops=") &&
> + strstr(help, "bps_rd=") && strstr(help, "bps_wr=") &&
> + strstr(help, "iops_rd=") && strstr(help, "iops_wr="))
> + qemuCapsSet(flags, QEMU_CAPS_DRIVE_IOTUNE);
It should be sufficient to check for just one of these strings, rather
than all 6, since support for all 6 should be added in the same qemu
commit. Meanwhile, since qemu 1.0 does not support this feature, can
you point to a commit id that will become part of qemu 1.1, and which
actually confirms that this will be in the -help output?
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120118/fc7e1a3a/attachment-0001.sig>
More information about the libvir-list
mailing list