[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [patch] Fix block I/O hang.

From: Gerd Hoffmann
Subject: [Qemu-devel] [patch] Fix block I/O hang.
Date: Tue, 11 Nov 2008 17:35:56 +0100
User-agent: Thunderbird (X11/20080723)


$subject says all.

please apply,
>From db0f41a843004157fd1181082716f83879f518ca Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <address@hidden>
Date: Tue, 11 Nov 2008 17:31:55 +0100
Subject: [PATCH] Fix qemu hang in block layer.

Without s->rfd being non-blocking qemu hangs in posix_aio_read()
due to the read() syscall blocking.

Signed-off-by: Gerd Hoffmann <address@hidden>
 block-raw-posix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/block-raw-posix.c b/block-raw-posix.c
index c06e38d..a08a773 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -591,6 +591,7 @@ static int posix_aio_init(void)
     s->rfd = fds[0];
     s->wfd = fds[1];
+    fcntl(s->rfd, F_SETFL, O_NONBLOCK);
     fcntl(s->wfd, F_SETFL, O_NONBLOCK);
     qemu_aio_set_fd_handler(s->rfd, posix_aio_read, NULL, posix_aio_flush, s);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]