From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35003 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P97nm-0000lZ-V3 for qemu-devel@nongnu.org; Thu, 21 Oct 2010 22:56:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P97nl-0000BV-UU for qemu-devel@nongnu.org; Thu, 21 Oct 2010 22:56:18 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:54821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P97nl-0000BH-Nq for qemu-devel@nongnu.org; Thu, 21 Oct 2010 22:56:17 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e6.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o9M2uZ99023567 for ; Thu, 21 Oct 2010 22:56:35 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9M2tuZk156090 for ; Thu, 21 Oct 2010 22:56:00 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9M2tuZE007218 for ; Fri, 22 Oct 2010 00:55:56 -0200 From: Ryan Harper Date: Thu, 21 Oct 2010 21:55:51 -0500 Message-Id: <1287716153-25305-1-git-send-email-ryanh@us.ibm.com> Subject: [Qemu-devel] [PATCH 0/2] v3 Decouple block device removal from device removal List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Anthony Liguori , Ryan Harper , Kevin Wolf This patch series decouples the detachment of a block device from the removal of the backing pci-device. Removal of a hotplugged pci device requires the guest to respond before qemu tears down the block device. In some cases, the guest may not respond leaving the guest with continued access to the block device. The new monitor command, drive_unplug, will revoke a guests access to the block device independently of the removal of the pci device. The first patch adds a new drive find method, the second patch implements the monitor command and block layer changes. Changes since v2: - Added QMP command for drive_unplug() Changes since v1: - CodingStyle fixes - Added qemu_aio_flush() to bdrv_unplug() Signed-off-by: Ryan Harper