diff options
| author | Kevin Wolf | 2018-02-07 16:38:05 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2018-03-09 15:17:48 +0100 |
| commit | 89b259eeaa0f4ad3fa89cbe500da9335536e20ee (patch) | |
| tree | 01656995c7920de5b036a78703931d9928585185 /include | |
| parent | ssh: Support .bdrv_co_create (diff) | |
| download | qemu-89b259eeaa0f4ad3fa89cbe500da9335536e20ee.tar.gz qemu-89b259eeaa0f4ad3fa89cbe500da9335536e20ee.tar.xz qemu-89b259eeaa0f4ad3fa89cbe500da9335536e20ee.zip | |
file-posix: Fix no-op bdrv_truncate() with falloc preallocation
If bdrv_truncate() is called, but the requested size is the same as
before, don't call posix_fallocate(), which returns -EINVAL for length
zero and would therefore make bdrv_truncate() fail.
The problem can be triggered by creating a zero-sized raw image with
'falloc' preallocation mode.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
