[6892] Fix vectored aio bounce handling immediate errors (Avi Kivity)
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 <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>
Modified Paths:
--------------
trunk/block.c
Modified: trunk/block.c
===================================================================
block.c +5 -0
@@ -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; }