]> git.proxmox.com Git - qemu.git/commit
qcow2: Fix error handling in l2_allocate
authorKevin Wolf <kwolf@redhat.com>
Fri, 28 May 2010 17:12:24 +0000 (19:12 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Wed, 9 Jun 2010 16:36:09 +0000 (18:36 +0200)
commit258e351d128bab86c185aa4836654aebc22a82a1
tree7535d51826f4134eebd1ce567c5778560f94c452
parentcd14f4d346f2b1099b2374e1bd177d143d687a77
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>
(cherry picked from commit 175e11526e2613b3dc031c23fec3107aa4a80307)

Conflicts:

block/qcow2-cluster.c

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