file-posix: Handle EINTR in preallocation=full write
diff mbox series

Message ID 20180727065314.1656-1-famz@redhat.com
State New
Headers show
Series
  • file-posix: Handle EINTR in preallocation=full write
Related show

Commit Message

Fam Zheng July 27, 2018, 6:53 a.m. UTC
Cc: qemu-stable@nongnu.org
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/file-posix.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Kevin Wolf July 27, 2018, 9:07 a.m. UTC | #1
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
Fam Zheng July 27, 2018, 9:16 a.m. UTC | #2
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

Patch
diff mbox series

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");