aboutsummaryrefslogtreecommitdiff
path: root/block/file-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/file-posix.c')
-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 3794c0007a..30642b6ca9 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1728,6 +1728,9 @@ static int raw_regular_truncate(int fd, int64_t offset, PreallocMode prealloc,
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");