From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzwDr-0002wI-4c for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:36:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzwDp-0002tB-KJ for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:36:10 -0500 Received: from [199.232.76.173] (port=60304 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzwDp-0002sq-AJ for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:36:09 -0500 Received: from mx2.redhat.com ([66.187.237.31]:35503) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzwDp-0004jY-HY for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:36:09 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mABGZxwo025451 for ; Tue, 11 Nov 2008 11:35:59 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mABGZwrG014769 for ; Tue, 11 Nov 2008 11:35:59 -0500 Received: from zweiblum.travel.kraxel.org (vpn-4-149.str.redhat.com [10.32.4.149]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mABGZvJT031433 for ; Tue, 11 Nov 2008 11:35:58 -0500 Message-ID: <4919B46C.3040804@redhat.com> Date: Tue, 11 Nov 2008 17:35:56 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010902060005010207040304" Subject: [Qemu-devel] [patch] Fix block I/O hang. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------010902060005010207040304 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, $subject says all. please apply, Gerd --------------010902060005010207040304 Content-Type: text/plain; name="0050-Fix-qemu-hang-in-block-layer.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0050-Fix-qemu-hang-in-block-layer.patch" >>From db0f41a843004157fd1181082716f83879f518ca Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann 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 --- 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); -- 1.5.6.5 --------------010902060005010207040304--