]> 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)
committerAurelien Jarno <aurelien@aurel32.net>
Wed, 9 Jun 2010 16:36:09 +0000 (18:36 +0200)
commitff9e1776172a6533e7501eda67a7411fe6988eb6
treed215433d80cde26b3885e165d8d025cb22977ff6
parentdb3519a9ece7ee5005f75d5bfa27fccc6d6bc16a
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>
(cherry picked from commit 25408c09502be036e5575754fe54019ed4ed5dfa)
block/qcow2-refcount.c