mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
308999e9d4
commit
a1c81f4f16
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue