[libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

john cooper john.cooper at redhat.com
Tue Jan 27 21:42:07 UTC 2009


Daniel P. Berrange wrote:
>
> If you loook at src/qemu_conf.c, you'll find a nice method called
> qemudExtractVersionInfo, which runs 'qemu -help' and checks for
> certain interesting command line arguments :-)
That problem does seem to be crying for some type
of structured interface to avoid subtle breakage
should someone modify the output of "--help".
I'm sure I'm preaching to the choir here.

So it now adapts for the cases of old syntax and
"writethrough" as well as new syntax and "on"
since qemu will otherwise balk at those cache
flag / version combinations.
> One note about the enums - rather than adding old style CACHEON
> CACHE_OFF options to the main enum in domain_conf, just create
> a second enum in the qemu_conf.c file for recording the mapping
> of virDomainDiskCache values to old style QEMU arguments values..
As we are adapting in both directions I left the
single enum representing the entire option list
to simplify things. Updated patch is attached.

-john

-- 
john.cooper at redhat.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-drive-cache-09012700.patch
Type: text/x-patch
Size: 7464 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090127/a957d48b/attachment-0001.bin>


More information about the libvir-list mailing list