[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full writ
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write |
Date: |
Fri, 27 Jul 2018 14:53:14 +0800 |
Cc: address@hidden
Signed-off-by: Fam Zheng <address@hidden>
---
block/file-posix.c | 3 +++
1 file changed, 3 insertions(+)
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");
--
2.17.1
- [Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write,
Fam Zheng <=