[libvirt] [PATCH 08/12] conf: domain: Parse backingStore with VIR_DOMAIN_DEF_PARSE_DISK_SOURCE

Peter Krempa posted 12 patches 6 years, 6 months ago
[libvirt] [PATCH 08/12] conf: domain: Parse backingStore with VIR_DOMAIN_DEF_PARSE_DISK_SOURCE
Posted by Peter Krempa 6 years, 6 months ago
The only code path which calls the parser with the
VIR_DOMAIN_DEF_PARSE_DISK_SOURCE is from qemuDomainBlockCopy. Since that
code path can properly handle backing chains for the disk and it's
desired to pass the parsed chains to the block copy code remove the
condition which prevents parsing the <backingStore> element.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/conf/domain_conf.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0456369d55..52a3dd4064 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10293,10 +10293,8 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
     VIR_STEAL_PTR(def->vendor, vendor);
     VIR_STEAL_PTR(def->product, product);

-    if (!(flags & VIR_DOMAIN_DEF_PARSE_DISK_SOURCE)) {
-        if (virDomainDiskBackingStoreParse(ctxt, def->src, flags, xmlopt) < 0)
-            goto error;
-    }
+    if (virDomainDiskBackingStoreParse(ctxt, def->src, flags, xmlopt) < 0)
+        goto error;

     if (flags & VIR_DOMAIN_DEF_PARSE_STATUS &&
         virDomainDiskDefParsePrivateData(ctxt, def, xmlopt) < 0)
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 08/12] conf: domain: Parse backingStore with VIR_DOMAIN_DEF_PARSE_DISK_SOURCE
Posted by Ján Tomko 6 years, 6 months ago
On Thu, Aug 08, 2019 at 06:00:38PM +0200, Peter Krempa wrote:
>The only code path which calls the parser with the
>VIR_DOMAIN_DEF_PARSE_DISK_SOURCE is from qemuDomainBlockCopy. Since that
>code path can properly handle backing chains for the disk and it's
>desired to pass the parsed chains to the block copy code remove the
>condition which prevents parsing the <backingStore> element.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/conf/domain_conf.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list