From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSL04-0007KQ-8l for qemu-devel@nongnu.org; Thu, 20 Aug 2015 04:15:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSL00-0003Yr-R9 for qemu-devel@nongnu.org; Thu, 20 Aug 2015 04:15:03 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:52883 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSL00-0003XF-CB for qemu-devel@nongnu.org; Thu, 20 Aug 2015 04:15:00 -0400 From: Peter Lieven Date: Thu, 20 Aug 2015 10:14:06 +0200 Message-Id: <1440058448-27847-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCH 0/2] ide/atapi: partially avoid deadlock if the storage backend is dead List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: kwolf@redhat.com, stefanha@gmail.com, Peter Lieven , jsnow@redhat.com, pbonzini@redhat.com the blk_drain_all() that is executed if the guest issues a DMA cancel leads to a stuck main loop if the storage backend (e.g. a NFS share) is unresponsive. This scenario is a common case for CDROM images mounted from an NFS share. In this case a broken NFS server can take down the whole VM even if the mounted CDROM is not used and was just not unmounted after usage. This approach avoids the blk_drain_all for read-only media and cancelles the AIO locally and makes the callback a NOP if the original request is completed after the NFS share is responsive again. Peter Lieven (2): block/io: allow AIOCB without callback ide/atapi: partially avoid deadlock if the storage backend is dead block/io.c | 8 ++++++-- hw/ide/pci.c | 32 ++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 16 deletions(-) -- 1.9.1