virDomainDiskTranslateSourcePool: Don't re-translate already translated defs

If a disk definition was already translated re-doing it makes no sense.

Skip the translation if the 'actualtype' is already populated.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-10-12 16:18:12 +02:00
parent d8fd9904ff
commit 4ebb454231

View File

@ -30529,7 +30529,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDef *def)
virStorageSource *n;
for (n = def->src; virStorageSourceIsBacking(n); n = n->backingStore) {
if (n->type != VIR_STORAGE_TYPE_VOLUME || !n->srcpool)
if (n->type != VIR_STORAGE_TYPE_VOLUME || !n->srcpool || n->srcpool->actualtype != VIR_STORAGE_TYPE_NONE)
continue;
if (!conn) {