From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47981 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pn85J-0002xr-UQ for qemu-devel@nongnu.org; Wed, 09 Feb 2011 06:19:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pn85I-0007Gs-Ic for qemu-devel@nongnu.org; Wed, 09 Feb 2011 06:19:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pn85I-0007Ge-C0 for qemu-devel@nongnu.org; Wed, 09 Feb 2011 06:19:44 -0500 Message-ID: <4D527847.9070400@redhat.com> Date: Wed, 09 Feb 2011 13:19:35 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v4 2/3] qcow2: Use QcowCache References: <1295543412-24012-1-git-send-email-kwolf@redhat.com> <1295543412-24012-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1295543412-24012-3-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: stefanha@gmail.com, qemu-devel@nongnu.org On 01/20/2011 07:10 PM, Kevin Wolf wrote: > Use the new functions of qcow2-cache.c for everything that works on refcount > block and L2 tables. > While autotesting qemu-kvm's stable-0.14 branch, this commit causes failures. The scenario is: - install OS - reboot - hang at GRUB prompt - qemu-img reports hundreds of leaked clusters The actual commit I am testing is in qemu-kvm.git qcow2-qcowcache-failure (tag). The test runs with -drive ,cache=unsafe. > @@ -719,7 +727,13 @@ static void qcow2_close(BlockDriverState *bs) > { > BDRVQcowState *s = bs->opaque; > qemu_free(s->l1_table); > - qemu_free(s->l2_cache); > + > + qcow2_cache_flush(bs, s->l2_table_cache); > + qcow2_cache_flush(bs, s->refcount_block_cache); > + > + qcow2_cache_destroy(bs, s->l2_table_cache); > + qcow2_cache_destroy(bs, s->refcount_block_cache); > + > qemu_free(s->cluster_cache); > qemu_free(s->cluster_data); > qcow2_refcount_close(bs); This is of course the immediate suspect, but it appears correct. Perhaps it isn't called, or maybe in the wrong place? -- error compiling committee.c: too many arguments to function