aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/mmio_interface.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2017-08-04 18:10:11 +0300
committerKevin Wolf <kwolf@redhat.com>2017-08-08 15:19:16 +0200
commit70d9110b440e5252f637d54b5efd33bbc6237c1f (patch)
tree1f5ce5f288f35b9d2f99bb9da3c7fe201cb76d20 /hw/misc/mmio_interface.c
parent0e51b9b7c7b24127e9996259b611db3177ef6444 (diff)
downloadqemu-70d9110b440e5252f637d54b5efd33bbc6237c1f.zip
qemu-70d9110b440e5252f637d54b5efd33bbc6237c1f.tar.gz
qemu-70d9110b440e5252f637d54b5efd33bbc6237c1f.tar.bz2
block: respect error code from bdrv_getlength in handle_aiocb_write_zeroes
Original idea beyond the code in question was the following: we have failed to write zeroes with fallocate(FALLOC_FL_ZERO_RANGE) as the simplest approach and via fallocate(FALLOC_FL_PUNCH_HOLE)/fallocate(0). We have the only chance now: if the request comes beyond end of the file. Thus we should calculate file length and respect the error code from that op. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Markus Armbruster <armbru@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> CC: Max Reitz <mreitz@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'hw/misc/mmio_interface.c')
0 files changed, 0 insertions, 0 deletions