qcow2: Fix image creation regression
commit6f745bdaac26bcbdd7e2ffa2a6ea29aabbbc54e1
authorKevin Wolf <kwolf@redhat.com>
Tue, 23 Feb 2010 15:06:20 +0000 (23 16:06 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 23 Feb 2010 19:23:29 +0000 (23 13:23 -0600)
tree98785dbac1d0a22e81ed51b4dccd7d623a246fb5
parent746c3cb5d55a702ba6285e97d2a13671f09285d8
qcow2: Fix image creation regression

When checking for errors, commit db89119d compares with the wrong values,
failing image creation even when there was no error. Additionally, if an
error has occured, we can't preallocate the image (it's likely broken).

This unbreaks test 023 of qemu-iotests.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block/qcow2.c