From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38934 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQeQ7-0004Xb-Ts for qemu-devel@nongnu.org; Mon, 21 Jun 2010 06:40:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQeQ6-0001tA-Mf for qemu-devel@nongnu.org; Mon, 21 Jun 2010 06:40:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62855) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQeQ6-0001sz-EM for qemu-devel@nongnu.org; Mon, 21 Jun 2010 06:40:02 -0400 Message-ID: <4C1F4174.3080504@redhat.com> Date: Mon, 21 Jun 2010 12:39:48 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <4C1B9D01.4020801@redhat.com> <1277060632-7768-1-git-send-email-morita.kazutaka@lab.ntt.co.jp> In-Reply-To: <1277060632-7768-1-git-send-email-morita.kazutaka@lab.ntt.co.jp> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2] qemu-io: check registered fds in command_loop() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: MORITA Kazutaka Cc: qemu-devel@nongnu.org Am 20.06.2010 21:03, schrieb MORITA Kazutaka: > Some block drivers use an aio handler and do I/O completion routines > in it. However, the handler is not invoked if we only do > aio_read/write, because registered fds are not checked at all. > > This patch registers an aio handler of STDIO to checks whether we can > read a command without blocking, and calls qemu_aio_wait() in > command_loop(). Any other handlers can be invoked when user input is > idle. > > Signed-off-by: MORITA Kazutaka > --- > > It seems that the QEMU aio implementation doesn't allow to call > qemu_aio_wait() in the aio handler, so the previous patch is broken. > > This patch only checks that STDIO is ready to read a line in the aio > handler, and invokes a command in command_loop(). > > I think this also fixes the problem which occurs in qemu-iotests. It does, indeed. Thanks, applied to the block branch. Kevin