qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6892] Fix vectored aio bounce handling immediate errors (Avi Kivity)
@ 2009-03-28 16:11 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-03-28 16:11 UTC (permalink / raw)
  To: qemu-devel

Revision: 6892
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6892
Author:   aliguori
Date:     2009-03-28 16:11:20 +0000 (Sat, 28 Mar 2009)
Log Message:
-----------
Fix vectored aio bounce handling immediate errors (Avi Kivity)

If a bounced vectored aio fails immediately (the inner aio submission
returning NULL) then the bounce handler erronously returns an aio
request which will never be completed (and which crashes when cancelled).

Fix by detecting that the inner request has failed and propagating the
error.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/block.c

Modified: trunk/block.c
===================================================================
--- trunk/block.c	2009-03-28 15:58:58 UTC (rev 6891)
+++ trunk/block.c	2009-03-28 16:11:20 UTC (rev 6892)
@@ -1306,6 +1306,11 @@
         s->aiocb = bdrv_aio_read(bs, sector_num, s->bounce, nb_sectors,
                                  bdrv_aio_rw_vector_cb, s);
     }
+    if (!s->aiocb) {
+        qemu_vfree(s->bounce);
+        qemu_aio_release(s);
+        return NULL;
+    }
     return &s->common;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-28 16:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-28 16:11 [Qemu-devel] [6892] Fix vectored aio bounce handling immediate errors (Avi Kivity) Anthony Liguori

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).