From 4ebb45423113d9cf6dd8c76f6deeb637b8f569fd Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 12 Oct 2023 16:18:12 +0200 Subject: [PATCH] virDomainDiskTranslateSourcePool: Don't re-translate already translated defs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {