From: Fam Zheng Date: Fri, 27 Jul 2018 06:53:14 +0000 (+0800) Subject: file-posix: Handle EINTR in preallocation=full write X-Git-Tag: qemu-xen-4.12.0-rc1~22^2~10 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a1c81f4f16a74d0d544f5d3ac405bcaad83541fd;p=qemu-xen.git file-posix: Handle EINTR in preallocation=full write Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- 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");