From patchwork Mon Nov 7 03:48:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changlong Xie X-Patchwork-Id: 9414259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DA59D60585 for ; Mon, 7 Nov 2016 03:40:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7E8128C6A for ; Mon, 7 Nov 2016 03:40:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7B6928C73; Mon, 7 Nov 2016 03:40:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 7CDE128C6A for ; Mon, 7 Nov 2016 03:40:52 +0000 (UTC) Received: from localhost ([::1]:50811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3anj-0006UT-Qq for patchwork-qemu-devel@patchwork.kernel.org; Sun, 06 Nov 2016 22:40:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3anO-0006Si-OF for qemu-devel@nongnu.org; Sun, 06 Nov 2016 22:40:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3anO-0004vi-1z for qemu-devel@nongnu.org; Sun, 06 Nov 2016 22:40:30 -0500 Received: from [59.151.112.132] (port=29422 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3anJ-0004hn-IA; Sun, 06 Nov 2016 22:40:25 -0500 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="12721631" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 Nov 2016 11:40:10 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 4CB6C43972A7; Mon, 7 Nov 2016 11:40:09 +0800 (CST) Received: from changlox.g08.fujitsu.local (10.167.225.55) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.279.2; Mon, 7 Nov 2016 11:40:12 +0800 From: Changlong Xie To: qemu devel , qemu block , Stefan Hajnoczi , Eric Blake , qemu trival Date: Mon, 7 Nov 2016 11:48:25 +0800 Message-ID: <1478490505-9315-1-git-send-email-xiecl.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 X-Originating-IP: [10.167.225.55] X-yoursite-MailScanner-ID: 4CB6C43972A7.AE86B X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: xiecl.fnst@cn.fujitsu.com X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 59.151.112.132 Subject: [Qemu-devel] [PATCH] docs/block-replication.txt: Introduce nbd qmp commands X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: zhanghailiang Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Changlong Xie --- docs/block-replication.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/block-replication.txt b/docs/block-replication.txt index 6bde673..6b9c77b 100644 --- a/docs/block-replication.txt +++ b/docs/block-replication.txt @@ -152,9 +152,22 @@ Primary: children.0.driver=raw Run qmp command in primary qemu: - { 'execute': 'human-monitor-command', + { 'execute': 'blockdev-add', 'arguments': { - 'command-line': 'drive_add -n buddy driver=replication,mode=primary,file.driver=nbd,file.host=xxxx,file.port=xxxx,file.export=colo1,node-name=nbd_client1' + 'driver': 'replication', + 'node-name': 'nbd_client1', + 'mode': 'primary', + 'file': { + 'driver': 'nbd', + 'export': 'colo1', + 'server': { + 'type': 'inet', + 'data': { + 'host': 'xxxx', + 'port': 'xxxx' + } + } + } } } { 'execute': 'x-blockdev-change', @@ -223,12 +236,11 @@ Primary: 'child': 'children.1' } } - { 'execute': 'human-monitor-command', + { 'execute': 'x-blockdev-del', 'arguments': { - 'command-line': 'drive_del xxxx' + 'node-name': 'nbd_client1' } } - Note: there is no qmp command to remove the blockdev now Secondary: The primary host is down, so we should do the following thing: