</choice>
</attribute>
</optional>
+ <ref name="diskBackingChain"/>
</element>
</define>
<define name="diskAuth">
if (virDomainStorageSourceParse(mirrorNode, ctxt, def->mirror, flags,
xmlopt) < 0)
return -1;
+ if (virDomainDiskBackingStoreParse(ctxt, def->mirror, flags, xmlopt) < 0)
+ return -1;
} else {
/* For back-compat reasons, we handle a file name encoded as
* attributes, even though we prefer modern output in the style of
if (virDomainDiskSourceFormat(&childBuf, disk->mirror, 0, false, flags, xmlopt) < 0)
return -1;
+ if (virDomainDiskBackingStoreFormat(&childBuf, disk->mirror, xmlopt, flags) < 0)
+ return -1;
+
if (virXMLFormatElement(buf, "mirror", &attrBuf, &childBuf) < 0)
return -1;
<mirror type='file' file='/tmp/copy.img' format='qcow2' job='copy'>
<format type='qcow2'/>
<source file='/tmp/copy.img'/>
+ <backingStore/>
</mirror>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
<mirror type='file' file='/tmp/logcopy.img' format='qcow2' job='copy' ready='abort'>
<format type='qcow2'/>
<source file='/tmp/logcopy.img'/>
+ <backingStore type='block' index='1'>
+ <format type='raw'/>
+ <source dev='/dev/HostVG/backing'>
+ <privateData>
+ <nodenames>
+ <nodename type='storage' name='test-backing-storage'/>
+ <nodename type='format' name='test-backing-format'/>
+ </nodenames>
+ </privateData>
+ </source>
+ <backingStore/>
+ </backingStore>
</mirror>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
<mirror type='file' file='/tmp/copy.img' format='qcow2' job='copy'>
<format type='qcow2'/>
<source file='/tmp/copy.img'/>
+ <backingStore/>
</mirror>
<target dev='vda' bus='virtio'/>
</disk>
<mirror type='file' file='/tmp/logcopy.img' format='qcow2' job='copy' ready='abort'>
<format type='qcow2'/>
<source file='/tmp/logcopy.img'/>
+ <backingStore type='block' index='1'>
+ <format type='raw'/>
+ <source dev='/dev/HostVG/backing'/>
+ <backingStore/>
+ </backingStore>
</mirror>
<target dev='vdb' bus='virtio'/>
</disk>
<mirror type='file' file='/tmp/copy.img' format='qcow2' job='copy'>
<format type='qcow2'/>
<source file='/tmp/copy.img'/>
+ <backingStore/>
</mirror>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
<mirror type='file' file='/tmp/logcopy.img' format='qcow2' job='copy' ready='abort'>
<format type='qcow2'/>
<source file='/tmp/logcopy.img'/>
+ <backingStore type='block' index='1'>
+ <format type='raw'/>
+ <source dev='/dev/HostVG/backing'/>
+ <backingStore/>
+ </backingStore>
</mirror>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>