From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQoEQ-000273-9A for qemu-devel@nongnu.org; Tue, 02 Feb 2016 22:35:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQoEM-0007z7-Ux for qemu-devel@nongnu.org; Tue, 02 Feb 2016 22:35:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQoEM-0007z3-NB for qemu-devel@nongnu.org; Tue, 02 Feb 2016 22:35:46 -0500 References: <1452676712-24239-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1452676712-24239-6-git-send-email-xiecl.fnst@cn.fujitsu.com> <56B0C945.60100@redhat.com> <56B17169.90601@cn.fujitsu.com> From: Eric Blake Message-ID: <56B17590.8020702@redhat.com> Date: Tue, 2 Feb 2016 20:35:44 -0700 MIME-Version: 1.0 In-Reply-To: <56B17169.90601@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="npo6LONhhTvgua97D729cmr7Hvq30KqIO" Subject: Re: [Qemu-devel] [PATCH v14 5/8] docs: block replication's description List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Changlong Xie , qemu devel , Fam Zheng , Max Reitz , Paolo Bonzini , Kevin Wolf , Stefan Hajnoczi Cc: Gonglei , zhanghailiang , fnstml-hwcolo@cn.fujitsu.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --npo6LONhhTvgua97D729cmr7Hvq30KqIO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >>> >>> Signed-off-by: Wen Congyang >>> Signed-off-by: zhanghailiang >>> Signed-off-by: Gonglei >>> Signed-off-by: Changlong Xie >>> --- >>> docs/block-replication.txt | 229 >>> +=3D=3D Usage =3D=3D >>> +Primary: >>> + -drive >>> if=3Dxxx,driver=3Dquorum,read-pattern=3Dfifo,id=3Dcolo1,vote-threshol= d=3D1,\ >>> + children.0.file.filename=3D1.raw,\ >>> + children.0.driver=3Draw >>> + >>> + Run qmp command in primary qemu: >>> + { 'execute': 'human-monitor-command', >>> + 'arguments': { >>> + 'command-line': 'drive_add buddy >>> driver=3Dreplication,mode=3Dprimary,file.driver=3Dnbd,file.host=3Dxxx= x,file.port=3Dxxxx,file.export=3Dcolo1,node-name=3Dnbd_client1,if=3Dnone'= >>> >> >> 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', >=20 > Hi Eric >=20 > What is 'remote-command' here? I just tried below commands, but got som= e > 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). >=20 > '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 :( --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --npo6LONhhTvgua97D729cmr7Hvq30KqIO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWsXWQAAoJEKeha0olJ0NqaigH/jTrEP+fjQ+WyvC0x5p1hYzy e71KsnhhLd4QMRbPAZwiqRWo24JKDyZuetOsABzWrkvHH0Lo4bFxQQIxNNNpQk9q mZwKouK9RlAfG1M3iyMREl0WsRuMRhOVevw/JE1v0cn1orTZdROSxP4/hQ6Fx7RS ylHQvmAulWK2PBGc6eFgwX0eBxipaZY9/LgCM4J2aLnhvS5XiRvxM4WRiuDiNhQ/ mB46KyA7LSvKeS8TE8l6hcqpEY4DD61xlUewxsEeh+uPpkcbpP9HFDcS4y8TDFwx L5f8hHIprEOWdv2FmOEOX6sAlJY0hyk8JBl2RLUpukxzhijJXdQyPaflASPqkVQ= =8wcx -----END PGP SIGNATURE----- --npo6LONhhTvgua97D729cmr7Hvq30KqIO--