mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
Properly mark auto-added 'terminator' virStorageSource
All backing chain members which were auto-added by image detection, including the terminating element, should have the 'detected' property set to true. This is needed to properly strip the detected elements in some cases, e.g. for the status XML where we could treat some images as manually terminated even when it was auto-detected. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
49aca0a845
commit
c90c97a734
@ -7890,8 +7890,10 @@ qemuDomainDetermineDiskChain(virQEMUDriver *driver,
|
||||
disksrc->format < VIR_STORAGE_FILE_BACKING) {
|
||||
|
||||
/* terminate the chain for such images as the code below would do */
|
||||
if (!disksrc->backingStore)
|
||||
if (!disksrc->backingStore) {
|
||||
disksrc->backingStore = virStorageSourceNew();
|
||||
disksrc->backingStore->detected = true;
|
||||
}
|
||||
|
||||
/* we assume that FD-passed disks always exist */
|
||||
if (virStorageSourceIsFD(disksrc))
|
||||
|
@ -1420,6 +1420,7 @@ virStorageSourceGetMetadataRecurse(virStorageSource *src,
|
||||
} else {
|
||||
/* add terminator */
|
||||
src->backingStore = virStorageSourceNew();
|
||||
src->backingStore->detected = true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user