aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-05-28 12:21:27 +0200
committerDoug Goldstein <cardoe@gentoo.org>2010-07-20 17:36:00 -0500
commitfdbec203bb2483e4533e62ef5c2dd0cc66f09234 (patch)
treeeaaa975cd489627f70e94ecee469b077eec65686 /ioport.h
parentqcow2: Fix corruption after refblock allocation (diff)
downloadqemu-kvm-fdbec203bb2483e4533e62ef5c2dd0cc66f09234.tar.gz
qemu-kvm-fdbec203bb2483e4533e62ef5c2dd0cc66f09234.tar.bz2
qemu-kvm-fdbec203bb2483e4533e62ef5c2dd0cc66f09234.zip
qcow2: Fix corruption after error in update_refcount
After it is done with updating refcounts in the cache, update_refcount writes all changed entries to disk. If a refcount block allocation fails, however, there was no change yet and therefore first_index = last_index = -1. Don't treat -1 as a normal sector index (resulting in a 512 byte write!) but return without updating anything in this case. Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 86fa8da83771238de55dc44819a1a27bafef5353)
Diffstat (limited to 'ioport.h')
0 files changed, 0 insertions, 0 deletions