]> git.proxmox.com Git - qemu.git/commit
qcow2: Fix corruption after refblock allocation
authorKevin Wolf <kwolf@redhat.com>
Fri, 28 May 2010 10:05:45 +0000 (12:05 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 May 2010 11:29:15 +0000 (13:29 +0200)
commit25408c09502be036e5575754fe54019ed4ed5dfa
tree3f2cd56548d3243e3a97dfd61080ee4eebc2019f
parented0df867d93341289d085ed9e9d44907e342c7ff
qcow2: Fix corruption after refblock allocation

Refblock allocation code needs to take into consideration that update_refcount
will load a different refcount block into the cache, so it must initialize the
cache for a new refcount block only afterwards. Not doing this means that not
only the refcount in the wrong block is updated, but also that the caller will
work on the wrong block.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c