[libvirt] [PATCHv2 9/9] RFC: conf: introduce <format> as synonym of <driver type=...>

Jiri Denemark jdenemar at redhat.com
Tue Apr 15 09:26:35 UTC 2014


On Mon, Apr 14, 2014 at 16:54:20 -0600, Eric Blake wrote:
> Still an RFC, since this claims over 400 tests are impacted:
> $ git grep '<driver.*type=\(\(.\)[a-zA-Z0-9]*\2\)' tests/*data/ | wc
> 
> Most uses of <driver> are per-disk - they affect the way the hypervisor
> exposes storage to the guest, regardless of how many host resources
> are involved.  But one attribute, the format, is something associated
> with each host resource, since it is possible to have a chain of
> files of different formats.  What's more, the <volume> XML of storage
> volume APIs already has a <format type='...'/> element.
> 
> This patch adds a <format type='...'/> element to each <disk>'s
> <source> within a <domain>.  For back-compat, we still output the
> format of the top-level resource in the <driver> element; and
> accept either spelling on input (if both spellings are given, they
> must match); but once the XML is extended to show full backing
> chain in <domain>s, the backing files will have only a <format>
> element, and no extra <driver> elements.

Hmm, I don't like the idea at all. It seem the only benefit of this
patch is a more reusable parts of XML schema for the price of
complicating everything else.

Jirka




More information about the libvir-list mailing list