From: Peter Krempa Date: Thu, 12 Oct 2023 14:18:12 +0000 (+0200) Subject: virDomainDiskTranslateSourcePool: Don't re-translate already translated defs X-Git-Tag: v9.9.0-rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ebb45423113d9cf6dd8c76f6deeb637b8f569fd;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Ján Tomko --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3e0989e2e8..e128457b00 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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) {