Re: [PATCH 1/6] Add support for storage format in FS <driver>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03.05.2013 15:49, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> Extend the <driver> element in filesystem devices to
> allow a storage format to be set. The new attribute
> uses 'format' to reflect the storage format. This is
> different from the <driver> element in disk devices
> which use 'type' to reflect the storage format. This
> is because the 'type' attribute on filesystem devices
> is already used for the driver backend, for which the
> disk devices use the 'name' attribute. Arggggh.
> 
> Anyway for disks we have
> 
>    <driver name="qemu" type="raw"/>
> 
> And for filesystems this change means we now have
> 
>    <driver type="loop" format="raw"/>
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  docs/formatdomain.html.in                 | 24 ++++++++++
>  docs/schemas/domaincommon.rng             | 73 ++++++++++++++++++++++---------
>  src/conf/domain_conf.c                    | 32 +++++++++++---
>  src/conf/domain_conf.h                    |  6 ++-
>  src/qemu/qemu_command.c                   |  3 +-
>  tests/lxcxml2xmldata/lxc-disk-formats.xml | 26 +++++++++++
>  tests/lxcxml2xmltest.c                    |  1 +
>  7 files changed, 134 insertions(+), 31 deletions(-)
>  create mode 100644 tests/lxcxml2xmldata/lxc-disk-formats.xml

> 
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index 10596dc..7d1cfa6 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -888,7 +888,7 @@
>    <define name="diskspec">
>      <interleave>
>        <optional>
> -        <ref name="driver"/>
> +        <ref name="diskDriver"/>
>        </optional>
>        <optional>
>          <ref name='diskMirror'/>
> @@ -1270,7 +1270,7 @@
>    <!--
>        Disk may use a special driver for access.
>      -->
> -  <define name="driver">
> +  <define name="diskDriver">
>      <element name="driver">
>        <choice>
>          <group>
> @@ -1314,13 +1314,13 @@
>      <optional>
>        <attribute name='type'>
>          <choice>
> -          <ref name='diskFormat'/>
> +          <ref name='storageFormat'/>
>            <value>aio</value> <!-- back-compat for 'raw' -->
>          </choice>
>        </attribute>
>      </optional>
>    </define>
> -  <define name='diskFormat'>
> +  <define name='storageFormat'>
>      <choice>
>        <value>raw</value>
>        <value>dir</value>
> @@ -1518,6 +1518,9 @@
>            <attribute name="type">
>              <value>file</value>
>            </attribute>
> +          <optional>
> +            <ref name="diskDriver"/>
> +          </optional>
>            <interleave>
>              <element name="source">
>                <attribute name="file">
> @@ -1531,6 +1534,9 @@
>            <attribute name="type">
>              <value>block</value>
>            </attribute>
> +          <optional>
> +            <ref name="diskDriver"/>
> +          </optional>
>            <interleave>
>              <element name="source">
>                <attribute name="dev">
> @@ -1547,6 +1553,9 @@
>                <value>mount</value>
>              </attribute>
>            </optional>
> +          <optional>
> +            <ref name="diskDriver"/>
> +          </optional>
>            <interleave>
>              <element name="source">
>                <attribute name="dir">
> @@ -1554,22 +1563,6 @@
>                </attribute>
>                <empty/>
>              </element>
> -            <optional>
> -              <element name="driver">
> -                <attribute name="type">
> -                  <choice>
> -                    <value>path</value>
> -                    <value>handle</value>
> -                  </choice>
> -                </attribute>
> -                <optional>
> -                  <attribute name="wrpolicy">
> -                    <value>immediate</value>
> -                  </attribute>
> -                </optional>
> -                <empty/>
> -              </element>
> -            </optional>
>            </interleave>
>          </group>
>          <group>

After this chunk the 'syntax-check' complains. Could you fix that?

Otherwise I have not spotted anything wrong. ACK.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]