[libvirt] [PATCH v2] Added capability checking for block <iotune> setting.
Eric Blake
eblake at redhat.com
Wed Jan 18 17:01:34 UTC 2012
On 01/18/2012 09:42 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. The support
> for blkiotune setting was added in upstream qemu repo under commit
> 0563e191516289c9d2f282a8c50f2eecef2fa773.
Thanks - that was the piece I was missing. I can confirm that the
commit includes:
" [,readonly=on|off]\n"
+ "
[[,bps=b]|[[,bps_rd=r][,bps_wr=w]]][[,iops=i]|[[,iops_rd=r][,iops_wr=w]]\n"
" use 'file' as a drive image\n", QEMU_ARCH_ALL)
> @@ -1031,6 +1033,8 @@ 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="))
> + qemuCapsSet(flags, QEMU_CAPS_DRIVE_IOTUNE);
which means that this is an accurate test. And when qemu 1.1 is ever
released, we can update tests/qemuhelpdata/ to capture the -help output
of the new release and ensure that this bit gets set appropriately (all
of the existing qemu -help output in that directory are from qemu
versions that pre-date the capability, so you already have the
counterpoint test that we are not hitting false positives with this
strstr()).
ACK and pushed.
--
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/0223b2f4/attachment-0001.sig>
More information about the libvir-list
mailing list