Message ID | 20180727065314.1656-1-famz@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | file-posix: Handle EINTR in preallocation=full write | expand |
Am 27.07.2018 um 08:53 hat Fam Zheng geschrieben: > Cc: qemu-stable@nongnu.org > Signed-off-by: Fam Zheng <famz@redhat.com> Thanks, applied to the block branch. Kevin
On Fri, 07/27 14:53, Fam Zheng wrote: > Cc: qemu-stable@nongnu.org > Signed-off-by: Fam Zheng <famz@redhat.com> Actually cc qemu-stable@nongnu.org
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");
Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng <famz@redhat.com> --- block/file-posix.c | 3 +++ 1 file changed, 3 insertions(+)