Re: qcow2 corruption observed, fixed by reverting old change

Consul
2009-02-12T22:57:12Z

Jamie Lokier wrote:
>
> It was just for clarity. If there are any bugs it's more likely to be
> truncation on a 32 bit host :-)
>
Maybe not a proper fix, do you see the same "corruption" with this patch?
I don't know if it causes any memory leaks, but it certainly clears the
segfaults while running my old qcow2 windows images. Perhaps this is a
wrong place to free() or it needs a condition?

$ svn diff block.c
Index: block.c
===================================================================
--- block.c (revision 6618)
+++ block.c (working copy)
@@ -1263,7 +1263,7 @@
if (!s->is_write) {
qemu_iovec_from_buffer(s->iov, s->bounce, s->iov->size);
}
- qemu_free(s->bounce);
+ //qemu_free(s->bounce);
s->this_aiocb->cb(s->this_aiocb->opaque, ret);
qemu_aio_release(s->this_aiocb);
}