]> git.proxmox.com Git - qemu.git/commit - block/curl.c
block/curl: Don't finish AIOCBs too early
authorNick Thomas <nick@bytemark.co.uk>
Wed, 21 Sep 2011 10:55:50 +0000 (11:55 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 21 Sep 2011 13:16:04 +0000 (15:16 +0200)
commit363c3c85350d79d224265aac11db1fbcb61215dc
tree1c98760e1100a6c0cbc1ba98d1c924177e29abe1
parentc84dcdc1d6583ebe5841907c99d95deb8c40a6e0
block/curl: Don't finish AIOCBs too early

The previous behaviour was to finish AIOCBs inside curl_aio_readv()
if the data was cached. This caused the following failed assertion
at hw/ide/pci.c:314: bmdma_cmd_writeb

"Assertion `bm->bus->dma->aiocb == ((void *)0)' failed."

By scheduling a QEMUBH and performing the completion inside the
callback, we avoid this problem.

Signed-off-by: Nick Thomas <nick@bytemark.co.uk>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/curl.c