[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v2] qemu-io: check registered fds in command_loo
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] Re: [PATCH v2] qemu-io: check registered fds in command_loop() |
Date: |
Mon, 21 Jun 2010 12:39:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4 |
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 <address@hidden>
> ---
>
> 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