[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 2/2] qemu-io: check registered fds in command_lo
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] Re: [PATCH 2/2] qemu-io: check registered fds in command_loop() |
Date: |
Fri, 18 Jun 2010 18:21:21 +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 15.06.2010 19:53, 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 a command processing function as a fd handler to
> STDIO, 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>
This breaks qemu-iotests. The reason is that synchronous requests get
out of order. Previously, do_aio_readv/writev waited until the request
was completed, and only afterwards the next command was read from stdio.
Now the next command can start during the qemu_aio_wait() that
do_aio_readv/writev uses internally to wait.
So we either need to deregister the fd handler while a command is
running, or (more cleanly) have an async_context_push/pop for any
command except aio_*.
Kevin