Raw local files do not pass through the backing store detector and thus
the code did not allocate the required backing store terminator for
them. Previously the terminating element would be formatted into the XML
since the default values used for the metadata allowed that. This is a
regression since
a693fdba0111ff which was not detected in the review.
This patch also reverts all the changes in the test files.
goto cleanup;
}
+ /* terminate the chain for such images as the code below would do */
+ if (!src->backingStore &&
+ VIR_ALLOC(src->backingStore) < 0)
+ goto cleanup;
+
ret = 0;
goto cleanup;
}
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='vde' bus='virtio'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='hda' bus='virtio'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='hdb' bus='virtio'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='hda' bus='virtio'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='hda' bus='virtio'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='hda' bus='virtio'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='sdg' bus='scsi'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='sdf' bus='scsi'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='sdq' bus='usb'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='vde' bus='virtio'/>
<readonly/>
<shareable/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
+ <backingStore/>
<target dev='sdf' bus='scsi'/>
<readonly/>
<shareable/>