All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Changlong Xie <xiecl.fnst@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>, Fam Zheng <famz@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: Gonglei <arei.gonglei@huawei.com>,
	zhanghailiang <zhang.zhanghailiang@huawei.com>,
	fnstml-hwcolo@cn.fujitsu.com
Subject: Re: [Qemu-devel] [PATCH v14 5/8] docs: block replication's description
Date: Tue, 2 Feb 2016 20:35:44 -0700	[thread overview]
Message-ID: <56B17590.8020702@redhat.com> (raw)
In-Reply-To: <56B17169.90601@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 2338 bytes --]

On 02/02/2016 08:18 PM, Changlong Xie wrote:
> On 02/02/2016 11:20 PM, Eric Blake wrote:
>> On 01/13/2016 02:18 AM, Changlong Xie wrote:
>>> From: Wen Congyang <wency@cn.fujitsu.com>
>>>
>>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>>> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>>> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
>>> ---
>>>   docs/block-replication.txt | 229

>>> +== Usage ==
>>> +Primary:
>>> +  -drive
>>> if=xxx,driver=quorum,read-pattern=fifo,id=colo1,vote-threshold=1,\
>>> +         children.0.file.filename=1.raw,\
>>> +         children.0.driver=raw
>>> +
>>> +  Run qmp command in primary qemu:
>>> +    { 'execute': 'human-monitor-command',
>>> +      'arguments': {
>>> +          'command-line': 'drive_add buddy
>>> driver=replication,mode=primary,file.driver=nbd,file.host=xxxx,file.port=xxxx,file.export=colo1,node-name=nbd_client1,if=none'
>>>
>>
>> Eww. We shouldn't ever have to pack a command line as . single QMP
>> string that needs reparsing.  Instead, you should pass the information
>> as a nested QMP dictionary, something like:
>>
>> 'arguments': {
>>    'remote-command': { 'command': 'drive_add', 'name': 'buddy',
>>                        'driver': 'replication', 'mode': 'primary',
>>                        'file': { 'driver': 'nbd', 'host': 'xxxx',
> 
> Hi Eric
> 
> What is 'remote-command' here? I just tried below commands, but got some
> errors.

Oh, I totally missed that this was using the existing
'human-monitor-command' to send an HMP command, instead of trying to
send a formal QMP command.  I thought you were documenting a new QMP
command.

Still, it would be nice to do this command using strict QMP (that would
be via 'blockdev-add') rather than via HMP (an all-in-one text command
crammed into the single 'command-line' argument).

> 
> 'blockdev-add' doesn't support 'nbd'. So we use 'drive_add' here, and
> it's a hmp command. If i'm right, there seems just one way to execute
> hmp commands in QMP:

For 2.6, we _really_ ought to get blockdev-add working for everything.
We're running short on time, though :(

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-02-03  3:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13  9:18 [Qemu-devel] [PATCH v14 0/8] Block replication for continuous checkpoints Changlong Xie
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 1/8] unblock backup operations in backing file Changlong Xie
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 2/8] Store parent BDS in BdrvChild Changlong Xie
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 3/8] Backup: clear all bitmap when doing block checkpoint Changlong Xie
2016-01-27 16:05   ` Stefan Hajnoczi
2016-01-28  2:22     ` Changlong Xie
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 4/8] Allow creating backup jobs when opening BDS Changlong Xie
2016-01-27 14:04   ` Stefan Hajnoczi
2016-01-28  2:22     ` Changlong Xie
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 5/8] docs: block replication's description Changlong Xie
2016-02-02 15:20   ` Eric Blake
2016-02-03  3:18     ` Changlong Xie
2016-02-03  3:35       ` Eric Blake [this message]
2016-02-03  3:40         ` Wen Congyang
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 6/8] auto complete active commit Changlong Xie
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 7/8] Implement new driver for block replication Changlong Xie
2016-01-20  0:04   ` Eric Blake
2016-01-20  7:45     ` Changlong Xie
2016-01-27 14:46   ` Stefan Hajnoczi
2016-01-28  1:13     ` Wen Congyang
2016-01-28 15:15       ` Stefan Hajnoczi
2016-01-29  3:13         ` Changlong Xie
2016-01-29 15:46           ` Stefan Hajnoczi
2016-02-01  1:13             ` Wen Congyang
2016-02-02 14:34               ` Stefan Hajnoczi
2016-02-03  1:29                 ` Wen Congyang
2016-02-03  9:32                   ` Stefan Hajnoczi
2016-02-03  9:55                     ` Wen Congyang
2016-02-03 11:25                       ` Hailiang Zhang
2016-01-13  9:18 ` [Qemu-devel] [PATCH v14 8/8] support replication driver in blockdev-add Changlong Xie
2016-01-14  1:12 ` [Qemu-devel] [PATCH v14 0/8] Block replication for continuous checkpoints Changlong Xie
2016-01-19  1:27   ` Hailiang Zhang
2016-01-24 13:34 ` Wen Congyang
2016-01-26 16:04   ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B17590.8020702@redhat.com \
    --to=eblake@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=famz@redhat.com \
    --cc=fnstml-hwcolo@cn.fujitsu.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiecl.fnst@cn.fujitsu.com \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.