[libvirt] [PATCHv5 06/13] Add compatibility attribute to disks

Peter Krempa pkrempa at redhat.com
Wed Sep 7 13:30:50 UTC 2016


On Wed, Aug 24, 2016 at 00:20:48 +0200, Ján Tomko wrote:
> A new attribute to alter the virtio revision:
> <disk>
>    <driver compatibility='transitional'/>
> </disk>
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1227354
> ---
>  docs/formatdomain.html.in                                   |  8 +++++++-
>  docs/schemas/domaincommon.rng                               |  3 +++
>  src/conf/domain_conf.c                                      |  7 +++++++
>  src/conf/domain_conf.h                                      |  1 +
>  tests/qemuxml2argvdata/qemuxml2argv-virtio-revision.xml     | 12 ++++++++++++
>  tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-revision.xml | 12 ++++++++++++
>  6 files changed, 42 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index 56dddbd..3f06613 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -2084,7 +2084,7 @@
>        <target dev='vdc' bus='virtio'/>
>      </disk>
>      <disk type='file' device='disk'>
> -      <driver name='qemu' type='qcow2'/>
> +      <driver name='qemu' type='qcow2' compatibility='modern'/>
>        <source file='/var/lib/libvirt/images/domain.qcow'/>
>        <backingStore type='file'>
>          <format type='qcow2'/>
> @@ -2667,6 +2667,12 @@
>              <code>bus</code> and "pci" or "ccw" <code>address</code> types.
>              <span class='since'>Since 1.2.8 (QEMU 2.1)</span>
>            </li>
> +          <li>
> +            The <code>compatibility</code> attribute can be used to specify
> +            the compatibility of virtio devices. Allowed values are
> +            <code>legacy</code>, <code>transitional</code> and <code>modern</code>.
> +            <span class="since">Since 2.2.0</span>.

Same rant about the values. Perhaps we could create a link to this
information so that it's not scattered across the docs html file.

> +          </li>
>          </ul>
>        </dd>
>        <dt><code>backenddomain</code></dt>
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index 8ed4b9d..2cf3c1b 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -1641,6 +1641,9 @@
>        <optional>
>          <ref name="detect_zeroes"/>
>        </optional>
> +      <optional>
> +        <ref name="compatibility"/>
> +      </optional>

You should be able to drop the <optional> section if you hide it into
the name itself.

>        <empty/>
>      </element>
>    </define>

ACK with the docs upgraded.




More information about the libvir-list mailing list