[libvirt] [PATCH] qemu: domain: update only newly detected images in qemuDomainDetermineDiskChain

Peter Krempa posted 1 patch 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/7376d2bd374a935da6b2667d4a161988271ed4f4.1530101031.git.pkrempa@redhat.com
Test syntax-check passed
src/qemu/qemu_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] qemu: domain: update only newly detected images in qemuDomainDetermineDiskChain
Posted by Peter Krempa 5 years, 10 months ago
The processing code which prepares images should be executed really only
for the images which were detected. The code actually tried to update
the last user-specified layer as well. Thankfully we don't do anything
that would be a problem at this point.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index f8a662f747..0fe9bc4b2a 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -8377,7 +8377,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
     if (virStorageFileGetMetadata(src, uid, gid, report_broken) < 0)
         goto cleanup;

-    for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
+    for (n = src->backingStore; virStorageSourceIsBacking(n); n = n->backingStore) {
         if (qemuDomainValidateStorageSource(n, priv->qemuCaps) < 0)
             goto cleanup;

-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: domain: update only newly detected images in qemuDomainDetermineDiskChain
Posted by Michal Prívozník 5 years, 10 months ago
On 06/27/2018 02:03 PM, Peter Krempa wrote:
> The processing code which prepares images should be executed really only
> for the images which were detected. The code actually tried to update
> the last user-specified layer as well. Thankfully we don't do anything
> that would be a problem at this point.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  src/qemu/qemu_domain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ACK

Michal

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