fix bdrv_aio_read API breakage in qcow2 (Andrea Arcangeli)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 31 Oct 2008 17:28:00 +0000 (17:28 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 31 Oct 2008 17:28:00 +0000 (17:28 +0000)
commitb6ef4c2f2b35fb6b5659457ab439cb724dcd495d
treefbbdd56ce185c6db8eef13b2669acd31fb11dedb
parentfa3c7513721464688bbe97aff21c8b590c480a60
fix bdrv_aio_read API breakage in qcow2 (Andrea Arcangeli)

I noticed the qemu_aio_flush was doing nothing at all. And a flood of
cmd_writeb commands leading to a noop-invocation of qemu_aio_flush
were executed.

In short all 'memset;goto redo' places must be fixed to use the bh and
not to call the callback in the context of bdrv_aio_read or the
bdrv_aio_read model falls apart. Reading from qcow2 holes is possible
with phyisical readahead (kind of breada in linux buffer cache).

This is needed at least for scsi, ide is lucky (or it has been
band-aided against this API breakage by fixing the symptom and not the
real bug).

Same bug exists in qcow of course, can be fixed later as it's less
urgent.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5574 c046a42c-6fe2-441c-8c8c-71466251a162
block-qcow2.c