Fix DMA API when handling an immediate error from block layer (Avi Kivity)
commitf1cfb26c5a8908f7007cb6937c7f503fa427a616
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 28 Mar 2009 16:11:25 +0000 (28 16:11 +0000)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 14 May 2009 13:09:31 +0000 (14 08:09 -0500)
tree3957e8a645ae1b583770f74b6a44248c2de79394
parent662524f5dce2584c1895d21c172524c5fffbeb28
Fix DMA API when handling an immediate error from block layer (Avi Kivity)

The block layer may signal an immediate error on an asynchronous request
by returning NULL.  The DMA API did not handle this correctly, returning
an AIO request which would never complete (and which would crash if
cancelled).

Fix by detecting the failure and propagating it.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6893 c046a42c-6fe2-441c-8c8c-71466251a162
dma-helpers.c