From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6KTF-00015q-Gi for qemu-devel@nongnu.org; Wed, 21 Sep 2011 06:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6KTE-0003yK-R7 for qemu-devel@nongnu.org; Wed, 21 Sep 2011 06:56:05 -0400 From: nick@bytemark.co.uk Date: Wed, 21 Sep 2011 11:55:48 +0100 Message-Id: <1316602550-13597-1-git-send-email-nick@bytemark.co.uk> Subject: [Qemu-devel] block/curl: Remedy a crashing bug completing AIOCBs from cache List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: nick@bytemark.co.uk, qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org In QEMU master, attempting to read a cached block from a HTTP (or otherwise) mounted ISO causes an assert to be triggered, killing the entire QEMU process. It looks like this: hw/ide/pci.c:314: bmdma_cmd_writeb: Assertion `bm->bus->dma->aiocb == ((void *)0)' failed. The following two patches add flush capability to the curl backend, and avoid triggering the assert by finishing the AIOCB in a QEMUBH callback, rather than directly in curl_aio_readv().