[Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write

Fam Zheng posted 1 patch 7 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180727065314.1656-1-famz@redhat.com
Test docker-mingw@fedora passed
Test checkpatch passed
Test docker-quick@centos7 passed
Test docker-clang@ubuntu passed
block/file-posix.c | 3 +++
1 file changed, 3 insertions(+)
[Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write
Posted by Fam Zheng 7 years, 3 months ago
Cc: qemu-stable@nongnu.org
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 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


Re: [Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write
Posted by Fam Zheng 7 years, 3 months ago
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

Re: [Qemu-devel] [PATCH] file-posix: Handle EINTR in preallocation=full write
Posted by Kevin Wolf 7 years, 3 months ago
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