From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40704 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PD1hN-0000b6-L5 for qemu-devel@nongnu.org; Mon, 01 Nov 2010 17:13:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PD1hM-00038Q-7Q for qemu-devel@nongnu.org; Mon, 01 Nov 2010 17:13:49 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:45376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PD1hM-000384-0B for qemu-devel@nongnu.org; Mon, 01 Nov 2010 17:13:48 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id oA1L4fo4003997 for ; Mon, 1 Nov 2010 15:04:41 -0600 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id oA1LDkdt253520 for ; Mon, 1 Nov 2010 15:13:46 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oA1LHis7000581 for ; Mon, 1 Nov 2010 15:17:44 -0600 From: Ryan Harper Date: Mon, 1 Nov 2010 16:13:28 -0500 Message-Id: <1288646010-8272-1-git-send-email-ryanh@us.ibm.com> Subject: [Qemu-devel] [PATCH 0/2] v5 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 , Markus Armbruster , 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 v4: - Droppped drive_get_by_id patch and use bdrv_find() instead - Added additional details about drive_unplug to hmp/qmp interface Changes since v3: - Moved QMP command for drive_unplug() to separate patch 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