mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemuBlockJobRewriteConfigDiskSource: Add debug statements when skipping disk update
It makes it easier to see what's going on when trying to figure out why the disk definition was not updated on a finalized blockjob. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
70b0c2c183
commit
c0b40323f8
@ -667,14 +667,23 @@ qemuBlockJobRewriteConfigDiskSource(virDomainObj *vm,
|
||||
g_autoptr(virStorageSource) copy = NULL;
|
||||
virStorageSource *n;
|
||||
|
||||
if (!vm->newDef)
|
||||
if (!vm->newDef) {
|
||||
VIR_DEBUG("not updating disk '%s' in persistent definition: no persistent definition",
|
||||
disk->dst);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(persistDisk = virDomainDiskByTarget(vm->newDef, disk->dst)))
|
||||
if (!(persistDisk = virDomainDiskByTarget(vm->newDef, disk->dst))) {
|
||||
VIR_DEBUG("not updating disk '%s' in persistent definition: disk not present",
|
||||
disk->dst);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!virStorageSourceIsSameLocation(disk->src, persistDisk->src))
|
||||
if (!virStorageSourceIsSameLocation(disk->src, persistDisk->src)) {
|
||||
VIR_DEBUG("not updating disk '%s' in persistent definition: disk source doesn't match",
|
||||
disk->dst);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(copy = virStorageSourceCopy(newsrc, true)) ||
|
||||
virStorageSourceInitChainElement(copy, persistDisk->src, true) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user