All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v2] qemu-io: check registered fds in command_loop()
Date: Mon, 21 Jun 2010 12:39:48 +0200	[thread overview]
Message-ID: <4C1F4174.3080504@redhat.com> (raw)
In-Reply-To: <1277060632-7768-1-git-send-email-morita.kazutaka@lab.ntt.co.jp>

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 <morita.kazutaka@lab.ntt.co.jp>
> ---
> 
> 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

      reply	other threads:[~2010-06-21 10:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 17:53 [Qemu-devel] [PATCH 0/2] qemu-io: fix aio_read/write problems MORITA Kazutaka
2010-06-15 17:53 ` [Qemu-devel] [PATCH 1/2] qemu-io: retry fgets() when errno is EINTR MORITA Kazutaka
2010-06-16 11:04   ` [Qemu-devel] " Kevin Wolf
2010-06-16 16:52     ` MORITA Kazutaka
2010-06-17  8:27       ` Kevin Wolf
2010-06-17 17:18         ` [Qemu-devel] Re: [PATCH 1/2] qemu-io: retry fgets() when errno is EINTRg Jamie Lokier
2010-06-18  4:11           ` MORITA Kazutaka
2010-06-15 17:53 ` [Qemu-devel] [PATCH 2/2] qemu-io: check registered fds in command_loop() MORITA Kazutaka
2010-06-16 11:24   ` [Qemu-devel] " Kevin Wolf
2010-06-18 16:21   ` Kevin Wolf
2010-06-20 19:03     ` [Qemu-devel] [PATCH v2] " MORITA Kazutaka
2010-06-21 10:39       ` Kevin Wolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C1F4174.3080504@redhat.com \
    --to=kwolf@redhat.com \
    --cc=morita.kazutaka@lab.ntt.co.jp \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.