mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
blockjob: don't remove older-style mirror XML
Commit 7c6fc39 introduced a regression in the XML produced for older
clients. The argument at the time was that clients shouldn't be
depending on output-only data for something that is only going to
be triggered for a transient guest; but John Ferlan reported that
the automated testsuite was such a client. It's better to be safe
than sorry by guaranteeing back-compat cruft. Note that later
patches will be using <mirror> for active block commit, but there
we don't have to worry about back-compat.
* src/conf/domain_conf.c (virDomainDiskDefFormat): Restore old
style output when necessary.
* docs/schemas/domaincommon.rng: Validate back-compat style.
* docs/formatdomain.html.in: Update the documentation.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml:
Update tests.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@@ -1891,11 +1891,13 @@
|
||||
attribute <code>ready</code> is present, then it is known the
|
||||
disk is ready to pivot; otherwise, the disk is probably still
|
||||
copying. For now, this element only valid in output; it is
|
||||
ignored on input. <span class="since">Since 1.2.6</span>
|
||||
(Older libvirt <span class="since">since 0.9.12</span> allowed
|
||||
only mirroring to a file, with the information reported
|
||||
in <code>file</code> and <code>format</code> attributes
|
||||
of <code>mirror</code> rather than subelements.)
|
||||
ignored on input. The <code>source</code> sub-element exists
|
||||
for all two-phase jobs <span class="since">since 1.2.6</span>.
|
||||
Older libvirt supported only block copy to a
|
||||
file, <span class="since">since 0.9.12</span>; for
|
||||
compatibility with older clients, such jobs include redundant
|
||||
information in the attributes <code>file</code>
|
||||
and <code>format</code> in the <code>mirror</code> element.
|
||||
</dd>
|
||||
<dt><code>target</code></dt>
|
||||
<dd>The <code>target</code> element controls the bus / device
|
||||
|
||||
@@ -4176,7 +4176,7 @@
|
||||
<define name='diskMirror'>
|
||||
<element name='mirror'>
|
||||
<choice>
|
||||
<group>
|
||||
<group> <!-- old format, for block copy back-compat -->
|
||||
<attribute name='file'>
|
||||
<ref name='absFilePath'/>
|
||||
</attribute>
|
||||
@@ -4185,8 +4185,16 @@
|
||||
<ref name='storageFormat'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<interleave>
|
||||
<ref name='diskSourceFile'/>
|
||||
<optional>
|
||||
<ref name="diskFormat"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<group> <!-- preferred format -->
|
||||
<interleave>
|
||||
<ref name="diskSource"/>
|
||||
<optional>
|
||||
|
||||
Reference in New Issue
Block a user