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