mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: Fix bug in nbdkit-backed backing chains
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@redhat.com>
This commit is contained in:
parent
f70b7c9772
commit
95c843eae3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user