From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVjCl-0008To-Lk for qemu-devel@nongnu.org; Wed, 30 Nov 2011 07:24:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVjCg-0007TK-OR for qemu-devel@nongnu.org; Wed, 30 Nov 2011 07:24:03 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:57761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVjCg-0007SZ-Ei for qemu-devel@nongnu.org; Wed, 30 Nov 2011 07:23:58 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Nov 2011 12:23:53 -0000 Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAUCNoqD2367564 for ; Wed, 30 Nov 2011 12:23:50 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAUCNnNO027271 for ; Wed, 30 Nov 2011 05:23:49 -0700 From: Stefan Hajnoczi Date: Wed, 30 Nov 2011 12:23:40 +0000 Message-Id: <1322655824-31778-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/3] block: fix and detect qemu_aio_wait() issues List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This series fixes an issue where qemu_aio_flush() would return to IDE hardware emulation with requests still pending. Kevin Wolf found it in the block tree before qemu.git/master merge, so qemu.git/master is not affected and these patches are against his tree. A recent interaction between copy-on-read and "qcow2: Unlock during COW" emphasized the need for strong assertion checking. Patch 1 fixes an assertion failure with qcow2 images in hw/ide/pci.c:bmdma_cmd_writeb(). Patches 2 and 3 then introduce assertions that detect wait_for_overlapping_requests() deadlock and broken qemu_aio_wait(). In the future we will have better information if issues related to qemu_aio_wait() come up. I have run qemu-iotests for qcow2 and qed. I have also performed a RHEL6 guest install to qed and tested booting the guest with IDE and qcow2. Stefan Hajnoczi (3): qcow2: avoid reentrant bdrv_read() in copy_sectors() block: wait_for_overlapping_requests() deadlock detection block: convert qemu_aio_flush() calls to bdrv_drain_all() block-migration.c | 2 +- block.c | 27 +++++++++++++++++++++++++++ block.h | 1 + block/qcow2-cluster.c | 27 +++++++++++++++++++-------- blockdev.c | 4 ++-- cpus.c | 2 +- hw/ide/macio.c | 5 +++-- hw/ide/pci.c | 2 +- hw/virtio-blk.c | 2 +- hw/xen_platform.c | 2 +- qemu-io.c | 4 ++-- savevm.c | 2 +- xen-mapcache.c | 2 +- 13 files changed, 61 insertions(+), 21 deletions(-) -- 1.7.7.3