On 08/04/2017 10:10 AM, Denis V. Lunev wrote: > 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 <d...@openvz.org> > CC: Markus Armbruster <arm...@redhat.com> > CC: Kevin Wolf <kw...@redhat.com> > CC: Max Reitz <mre...@redhat.com> > CC: Stefan Hajnoczi <stefa...@redhat.com> > --- > block/file-posix.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature