summary refs log tree commit diff stats
path: root/qemu-io-cmds.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 /qemu-io-cmds.c
parent0e51b9b7c7b24127e9996259b611db3177ef6444 (diff)
downloadfocaccia-qemu-70d9110b440e5252f637d54b5efd33bbc6237c1f.tar.gz
focaccia-qemu-70d9110b440e5252f637d54b5efd33bbc6237c1f.zip
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 'qemu-io-cmds.c')
0 files changed, 0 insertions, 0 deletions