[libvirt] [PATCHv3 26/26] qemu: blockcopy: Don't remove existing disk mirror info

Eric Blake eblake at redhat.com
Thu Jun 26 03:29:17 UTC 2014


On 06/25/2014 10:55 AM, Peter Krempa wrote:
> When creating a new disk mirror the new struct is stored in a separate
> variable until everything went well. The removed hunk would actually
> remove existing mirror information for example when the api would be run
> if a mirror still exists.
> ---
>  src/qemu/qemu_driver.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 66752f1..f6f5ace 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -15382,10 +15382,6 @@ qemuDomainBlockCopy(virDomainObjPtr vm,
>   endjob:
>      if (need_unlink && unlink(dest))
>          VIR_WARN("unable to unlink just-created %s", dest);
> -    if (ret < 0 && disk) {
> -        virStorageSourceFree(disk->mirror);
> -        disk->mirror = NULL;
> -    }

Oh my.  This was a regression latently introduced in commit ff5f30b,
v1.2.1, then aggravated in commit 7b7bf001 (thankfully unreleased).
Thanks for catching and fixing this.

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140625/1b43f8e0/attachment-0001.sig>


More information about the libvir-list mailing list