From patchwork Fri Nov 12 17:07:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harper X-Patchwork-Id: 70990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6B1F3B713D for ; Sat, 13 Nov 2010 04:22:30 +1100 (EST) Received: from localhost ([127.0.0.1]:43819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGxKV-00071d-2X for incoming@patchwork.ozlabs.org; Fri, 12 Nov 2010 12:22:27 -0500 Received: from [140.186.70.92] (port=55432 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGxJG-00069h-3u for qemu-devel@nongnu.org; Fri, 12 Nov 2010 12:21:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGx64-0005KF-LW for qemu-devel@nongnu.org; Fri, 12 Nov 2010 12:07:37 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:52968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGx64-0005Jh-EF for qemu-devel@nongnu.org; Fri, 12 Nov 2010 12:07:32 -0500 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id oACGvLCM020351 for ; Fri, 12 Nov 2010 09:57:21 -0700 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oACH7MCB160516 for ; Fri, 12 Nov 2010 10:07:23 -0700 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 oACHBPaG016536 for ; Fri, 12 Nov 2010 10:11:25 -0700 Received: from localhost.localdomain (sig-9-48-53-248.mts.ibm.com [9.48.53.248]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id oACHBJWL016265; Fri, 12 Nov 2010 10:11:24 -0700 From: Ryan Harper To: Date: Fri, 12 Nov 2010 11:07:14 -0600 Message-Id: <1289581634-21177-3-git-send-email-ryanh@us.ibm.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1289581634-21177-1-git-send-email-ryanh@us.ibm.com> References: <1289581634-21177-1-git-send-email-ryanh@us.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Kevin Wolf , "Michael S. Tsirkin" , Markus Armbruster , Anthony Liguori , Ryan Harper , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 2/2] Add qmp version of drive_del X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Ryan Harper --- qmp-commands.hx | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 793cf1c..1e0d4e9 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -338,6 +338,35 @@ Example: EQMP { + .name = "drive_del", + .args_type = "id:s", + .params = "device", + .help = "remove host block device", + .user_print = monitor_user_noop, + .mhandler.cmd_new = do_drive_del, + }, + +SQMP +drive del +---------- + +Remove host block device. The result is that guest generated IO is no longer +submitted against the host device underlying the disk. Once a drive has +been deleted, the QEMU Block layer returns -EIO which results in IO +errors in the guest for applications that are reading/writing to the device. + +Arguments: + +- "id": the device's ID (json-string) + +Example: + +-> { "execute": "drive_del", "arguments": { "id": "drive-virtio-blk1" } } +<- { "return": {} } + +EQMP + + { .name = "cpu", .args_type = "index:i", .params = "index",