qcow2: preserve free_byte_offset when qcow2_alloc_bytes() fails
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 18 Jun 2012 13:00:57 +0000 (14:00 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 9 Jul 2012 13:53:01 +0000 (15:53 +0200)
commit206e6d8551839008b6858cf8f500d2e644d2b561
tree0a808315b236976d3756acdd0310fe8367f5966f
parentb35278f75450e57c134a153e6da9744c1db8382f
qcow2: preserve free_byte_offset when qcow2_alloc_bytes() fails

When qcow2_alloc_clusters() error handling code was introduced in commit
5d757b563d59142ca81e1073a8e8396750a0ad1a, the value of free_byte_offset
was clobbered in the error case.  This patch keeps free_byte_offset at 0
so we will try to allocate clusters again next time this function is
called.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c