qcow2: Restore L1 entry on l2_allocate failure
authorKevin Wolf <kwolf@redhat.com>
Mon, 7 Jun 2010 14:43:22 +0000 (16:43 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 15 Jun 2010 07:41:58 +0000 (09:41 +0200)
commit7fd7199f113a5b0fbc700571f2f2430a9add9c8c
tree85b6ee4a42bf2a574823c325a48e6a6f743d111a
parentb43b0d60ca6eb626fd14a2f3008fe787bf8439f9
qcow2: Restore L1 entry on l2_allocate failure

If writing the L1 table to disk failed, we need to restore its old content in
memory to avoid inconsistencies.

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