From patchwork Tue Feb 9 15:57:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 8263191 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F48FBEEE5 for ; Tue, 9 Feb 2016 16:02:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8BE720254 for ; Tue, 9 Feb 2016 16:02:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 25E54201D3 for ; Tue, 9 Feb 2016 16:02:31 +0000 (UTC) Received: from localhost ([::1]:57477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTAkI-0007Km-KT for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Feb 2016 11:02:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTAgM-0001Gv-PX for qemu-devel@nongnu.org; Tue, 09 Feb 2016 10:58:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTAgJ-0000n1-59 for qemu-devel@nongnu.org; Tue, 09 Feb 2016 10:58:26 -0500 Received: from smtp3.mundo-r.com ([212.51.32.191]:52158 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTAgI-0000mF-VT; Tue, 09 Feb 2016 10:58:23 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CIAwCUC7pW/5tjdVteGQEBAQEPAQEBAYMKgT+IXJ1RAQEBAQEBBQGBDwGQHIITAQ2BZoYNAoE0OBQBAQEBAQEBgQqEQgEBBHAJED8SPBsZiB8Bvm4BAQEHIIVKgj2HQINuBZZ4jVCBW40YhW+IUB4BAUKDZmiIUwEBAQ X-IPAS-Result: A2CIAwCUC7pW/5tjdVteGQEBAQEPAQEBAYMKgT+IXJ1RAQEBAQEBBQGBDwGQHIITAQ2BZoYNAoE0OBQBAQEBAQEBgQqEQgEBBHAJED8SPBsZiB8Bvm4BAQEHIIVKgj2HQINuBZZ4jVCBW40YhW+IUB4BAUKDZmiIUwEBAQ X-IronPort-AV: E=Sophos;i="5.22,421,1449529200"; d="scan'208";a="14549296" Received: from fanzine.igalia.com ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 09 Feb 2016 16:58:19 +0100 Received: from dsl-hkibrasgw4-50df50-201.dhcp.inet.fi ([80.223.80.201] helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim) id 1aTAgF-0001tq-Lq; Tue, 09 Feb 2016 16:58:20 +0100 Received: from berto by perseus.local with local (Exim 4.86) (envelope-from ) id 1aTAg2-0001V1-2d; Tue, 09 Feb 2016 17:58:06 +0200 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Tue, 9 Feb 2016 17:57:36 +0200 Message-Id: X-Mailer: git-send-email 2.7.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.51.32.191 Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Max Reitz Subject: [Qemu-devel] [PATCH v2 2/2] block: Update the x-blockdev-del documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Explain what happens if the user tries to delete a BlockBackend that contains media that was added separately using blockdev-add. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake --- qapi/block-core.json | 5 ++++- qmp-commands.hx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 33012b8..cc59ab9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2089,7 +2089,10 @@ # # In the former case the backend will be destroyed, along with its # inserted medium if there's any. The command will fail if the backend -# or its medium are in use. +# or its medium are in use. If the medium was also created with +# blockdev-add then the command will succeed, the backend will be +# destroyed but the medium will remain until it is deleted with +# x-blockdev-del. # # In the latter case the node will be destroyed. The command will fail # if the node is attached to a block backend or is otherwise being diff --git a/qmp-commands.hx b/qmp-commands.hx index 020e5ee..9710686 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -4151,7 +4151,10 @@ The selected device can be either a block backend or a graph node. In the former case the backend will be destroyed, along with its inserted medium if there's any. The command will fail if the backend -or its medium are in use. +or its medium are in use. If the medium was also created with +blockdev-add then the command will succeed, the backend will be +destroyed but the medium will remain until it is deleted with +x-blockdev-del. In the latter case the node will be destroyed. The command will fail if the node is attached to a block backend or is otherwise being