From mboxrd@z Thu Jan 1 00:00:00 1970 From: Consul Subject: Re: qcow2 corruption observed, fixed by reverting old change Date: Thu, 12 Feb 2009 14:57:12 -0800 Message-ID: References: <20090211070049.GA27821@shareable.org> <4992A108.8070304@suse.de> <20090211114126.GC31997@shareable.org> <4992C77D.4030104@suse.de> <20090211164814.GA7161@shareable.org> Reply-To: qemu-devel@nongnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: In-Reply-To: <20090211164814.GA7161@shareable.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org 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); } From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LXkUt-00075q-Lu for qemu-devel@nongnu.org; Thu, 12 Feb 2009 17:57:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LXkUs-000743-10 for qemu-devel@nongnu.org; Thu, 12 Feb 2009 17:57:30 -0500 Received: from [199.232.76.173] (port=43089 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXkUr-00073v-Tv for qemu-devel@nongnu.org; Thu, 12 Feb 2009 17:57:29 -0500 Received: from main.gmane.org ([80.91.229.2]:44309 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LXkUr-0000tB-Gd for qemu-devel@nongnu.org; Thu, 12 Feb 2009 17:57:29 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LXkUn-00085z-K5 for qemu-devel@nongnu.org; Thu, 12 Feb 2009 22:57:26 +0000 Received: from 204.147.152.1 ([204.147.152.1]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Feb 2009 22:57:25 +0000 Received: from void by 204.147.152.1 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Feb 2009 22:57:25 +0000 From: Consul Subject: Re: [Qemu-devel] qcow2 corruption observed, fixed by reverting old change Date: Thu, 12 Feb 2009 14:57:12 -0800 Message-ID: References: <20090211070049.GA27821@shareable.org> <4992A108.8070304@suse.de> <20090211114126.GC31997@shareable.org> <4992C77D.4030104@suse.de> <20090211164814.GA7161@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <20090211164814.GA7161@shareable.org> Sender: news Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org 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); }