mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: driver: Allow passing disk target as top image with block commit
Since we allow active layer block commit the users are allowed to commit the top of the chain (e.g. vda) into the backing image. The API would not accept that parameter, as it tried to look up the image in the backing chain. Add the ability to use the top level image target name explicitly as the top image of the block commit operation. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1451394
This commit is contained in:
parent
bb09afd5a2
commit
ed61e0b368
@ -16942,7 +16942,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
|
||||
if (qemuDomainDiskBlockJobIsActive(disk))
|
||||
goto endjob;
|
||||
|
||||
if (!top)
|
||||
if (!top || STREQ(top, disk->dst))
|
||||
topSource = disk->src;
|
||||
else if (virStorageFileParseChainIndex(disk->dst, top, &topIndex) < 0 ||
|
||||
!(topSource = virStorageFileChainLookup(disk->src, NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user