diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-04-07 16:52:34 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-04-12 18:06:51 +0200 |
commit | 40a99aace3f9ffd65af07a89c381db3550b22316 (patch) | |
tree | e2a235bc1d95ac54913fac51dcd32d892d53c7ea /block/qcow2-refcount.c | |
parent | 1fd06db03da73db868e54b838bb5ea02c10eea6c (diff) | |
download | qemu-40a99aace3f9ffd65af07a89c381db3550b22316.zip qemu-40a99aace3f9ffd65af07a89c381db3550b22316.tar.gz qemu-40a99aace3f9ffd65af07a89c381db3550b22316.tar.bz2 |
vpc: fix return value check for blk_pwrite
bdrv_pwrite_sync used to return zero or negative error, while blk_pwrite returns
the number of written bytes when successful. This caused VPC image creation
to fail spectacularly: it wrote the first 512 bytes, and then exited immediately
because of the non-zero answer from blk_pwrite. But the truly spectacular part
is that it returns a positive value (the 512 that blk_pwrite returned) causing
everyone to believe that it succeeded.
This fixes qemu-iotests with vpc format.
Fixes: b8f45cdf7827e39f9a1e6cc446f5972cc6144237
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2-refcount.c')
0 files changed, 0 insertions, 0 deletions