qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, Ryan Harper <ryanh@us.ibm.com>, kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH 1/3] Only call aio flush handler if set
Date: Mon, 22 Sep 2008 18:17:32 -0500	[thread overview]
Message-ID: <1222125454-21744-2-git-send-email-ryanh@us.ibm.com> (raw)
In-Reply-To: <1222125454-21744-1-git-send-email-ryanh@us.ibm.com>

If the aio handler doesn't register an io_flush handler, we'd SEGV; fix that by
only calling the flush handler if set.  BTW, aio handlers *should* register an
io_flush routine.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>

diff --git a/aio.c b/aio.c
index 687e4be..2bb3ed4 100644
--- a/aio.c
+++ b/aio.c
@@ -105,7 +105,8 @@ void qemu_aio_flush(void)
         ret = 0;
 
         LIST_FOREACH(node, &aio_handlers, node) {
-            ret |= node->io_flush(node->opaque);
+            if (node->io_flush)
+                ret |= node->io_flush(node->opaque);
         }
 
         qemu_aio_wait();

  reply	other threads:[~2008-09-22 23:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 23:17 [Qemu-devel] [PATCH 0/3] Refactor AIO to allow multiple AIO implementations Ryan Harper
2008-09-22 23:17 ` Ryan Harper [this message]
2008-09-23  2:38   ` [Qemu-devel] Re: [PATCH 1/3] Only call aio flush handler if set Anthony Liguori
2008-09-23 14:26     ` Ryan Harper
2008-09-23 14:34       ` Anthony Liguori
2008-09-23 14:41         ` Ryan Harper
2008-09-23 14:50           ` Anthony Liguori
2008-09-22 23:17 ` [Qemu-devel] [PATCH 2/3] Move aio implementation out of raw block driver Ryan Harper
2008-09-23  1:16   ` [Qemu-devel] " Ryan Harper
2008-09-23  2:45   ` Anthony Liguori
2008-09-23 14:39     ` Ryan Harper
2008-09-23 14:40       ` Anthony Liguori
2008-09-23 14:53       ` Gerd Hoffmann
2008-09-23 16:06         ` Anthony Liguori
2008-09-23 18:04           ` Gerd Hoffmann
2008-09-23 18:28             ` Anthony Liguori
2008-09-24 22:31     ` Marcelo Tosatti
2008-09-22 23:17 ` [Qemu-devel] " Ryan Harper
2008-09-23  1:22   ` [Qemu-devel] [PATCH 3/3] Add linux aio implementation for raw block devices Ryan Harper
2008-09-23  3:32 ` [Qemu-devel] Re: [PATCH 0/3] Refactor AIO to allow multiple AIO implementations Anthony Liguori
2008-09-23 14:43   ` Ryan Harper
2008-09-23 14:47     ` Anthony Liguori
2008-09-23 16:09     ` Anthony Liguori
2008-09-23 10:27 ` [Qemu-devel] " Jamie Lokier
2008-10-02 22:41 ` [Qemu-devel] " john cooper
2008-10-03 13:33   ` Ryan Harper

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=1222125454-21744-2-git-send-email-ryanh@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).