[PATCH v2 1/2] qemu: Fix bug in nbdkit-backed backing chains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When trying to start nbdkit-backed disks in backing chains, we were
accidentally always checking the private data of the top of the chain
instead of using the loop variable.

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 src/qemu/qemu_nbdkit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c
index 85e61be44c..1c72b6fe6a 100644
--- a/src/qemu/qemu_nbdkit.c
+++ b/src/qemu/qemu_nbdkit.c
@@ -901,7 +901,7 @@ qemuNbdkitStartStorageSource(virQEMUDriver *driver,
     virStorageSource *backing;
 
     for (backing = src; backing != NULL; backing = backing->backingStore) {
-        qemuDomainStorageSourcePrivate *priv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(src);
+        qemuDomainStorageSourcePrivate *priv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(backing);
 
         if (priv && priv->nbdkitProcess &&
             qemuNbdkitProcessStart(priv->nbdkitProcess, vm, driver) < 0)
@@ -919,7 +919,7 @@ qemuNbdkitStopStorageSource(virStorageSource *src,
     virStorageSource *backing;
 
     for (backing = src; backing != NULL; backing = backing->backingStore) {
-        qemuDomainStorageSourcePrivate *priv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(src);
+        qemuDomainStorageSourcePrivate *priv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(backing);
 
         if (priv && priv->nbdkitProcess &&
             qemuNbdkitProcessStop(priv->nbdkitProcess, vm) < 0)
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux