]> git.proxmox.com Git - qemu.git/commit
qcow2: Fix error handling in l2_allocate
authorKevin Wolf <kwolf@redhat.com>
Wed, 12 May 2010 14:23:26 +0000 (16:23 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 May 2010 11:14:25 +0000 (13:14 +0200)
commit175e11526e2613b3dc031c23fec3107aa4a80307
tree1a917b28794d81f2ea98eded2e11340ed531c5d4
parent1b7c801b40ce90795397bb566d019c9b76ef9c13
qcow2: Fix error handling in l2_allocate

l2_allocate has some intermediate states in which the image is inconsistent.
Change the order to write to the L1 table only after the new L2 table has
successfully been initialized.

Also reset the L2 cache in failure case, it's very likely wrong.

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