diff options
author | 2020-07-17 15:56:04 +0200 | |
---|---|---|
committer | 2020-07-21 16:28:57 +0200 | |
commit | bae127d4dcf6158c5042e2eee9582430839a9967 (patch) | |
tree | 6919befe979e743830757f1d820baa06831f98bb /include/hw/rtc | |
parent | Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-07-21' into staging (diff) | |
download | qemu-bae127d4dcf6158c5042e2eee9582430839a9967.tar.xz qemu-bae127d4dcf6158c5042e2eee9582430839a9967.zip |
file-posix: Handle `EINVAL` fallocate return value
The `detect-zeroes=unmap` option may issue unaligned
`FALLOC_FL_PUNCH_HOLE` requests, raw block devices can (and will) return
`EINVAL`, qemu should then write the zeroes to the blockdev instead of
issuing an `IO_ERROR`.
The problem can be reprodced like this:
$ qemu-io -c 'write -P 0 42 1234' --image-opts driver=host_device,filename=/dev/loop0,detect-zeroes=unmap
write failed: Invalid argument
Signed-off-by: Antoine Damhet <antoine.damhet@blade-group.com>
Message-Id: <20200717135603.51180-1-antoine.damhet@blade-group.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/hw/rtc')
0 files changed, 0 insertions, 0 deletions