aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2018-07-27 14:53:14 +0800
committerKevin Wolf <kwolf@redhat.com>2018-07-30 15:35:37 +0200
commita1c81f4f16a74d0d544f5d3ac405bcaad83541fd (patch)
tree47c62f3dfd5e4d4be71144b131f6ff92d860a85f /block
parent308999e9d46c7db062d314df98295a38e5732d01 (diff)
file-posix: Handle EINTR in preallocation=full write
Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/file-posix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index ad299beb38..928b863ced 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1646,6 +1646,9 @@ static int handle_aiocb_truncate(RawPosixAIOData *aiocb)
num = MIN(left, 65536);
result = write(fd, buf, num);
if (result < 0) {
+ if (errno == EINTR) {
+ continue;
+ }
result = -errno;
error_setg_errno(errp, -result,
"Could not write zeros for preallocation");