From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjxcH-0001P0-E4 for qemu-devel@nongnu.org; Fri, 22 Nov 2013 15:46:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjxcC-0003cT-CS for qemu-devel@nongnu.org; Fri, 22 Nov 2013 15:46:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjxcC-0003cF-4p for qemu-devel@nongnu.org; Fri, 22 Nov 2013 15:46:12 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAMKkAwh006522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 22 Nov 2013 15:46:11 -0500 Message-ID: <528FC290.1010806@redhat.com> Date: Fri, 22 Nov 2013 13:46:08 -0700 From: Eric Blake MIME-Version: 1.0 References: <1385097894-1380-1-git-send-email-famz@redhat.com> <1385097894-1380-7-git-send-email-famz@redhat.com> In-Reply-To: <1385097894-1380-7-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SsAmpcvdfeDkwq18Clmx5sbfmusvBJfb4" Subject: Re: [Qemu-devel] [PATCH v4 6/7] qmp: add command 'blockdev-backup' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: kwolf@redhat.com, hbrock@redhat.com, rjones@redhat.com, imain@redhat.com, stefanha@redhat.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SsAmpcvdfeDkwq18Clmx5sbfmusvBJfb4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/21/2013 10:24 PM, Fam Zheng wrote: > Similar to drive-backup, but this command uses a device id as target > instead of creating/opening an image file. >=20 > Also add blocker on target bs, since the target is also a named device > now. >=20 > Signed-off-by: Fam Zheng > --- > +++ b/qapi-schema.json > @@ -1844,6 +1844,40 @@ > '*on-target-error': 'BlockdevOnError' } } > =20 > ## > +# @BlockdevBackup > +# > +# @device: the name of the device which should be copied. > +# > +# @target: the name of the backup target device We're not very consistent on whether to end these with a '.'; but that's not the end of the world :) > +# Note that @on-source-error and @on-target-error only affect backgrou= nd I/O. > +# If an error occurs during a guest write request, the device's rerror= /werror > +# actions will be used. > +# > +# Since: 1.7 1.8 > +## > +{ 'type': 'BlockdevBackup', > + 'data': { 'device': 'str', 'target': 'str', > + 'sync': 'MirrorSyncMode', > + '*speed': 'int', > + '*on-source-error': 'BlockdevOnError', > + '*on-target-error': 'BlockdevOnError' } } > + > +# @blockdev-backup > +# > +# Block device version for drive-backup command. Use existing device a= s target > +# of backup. > +# > +# For the arguments, see the documentation of BlockdevBackup. > +# > +# Returns: nothing on success > +# If @device or @target is not a valid block device, DeviceNo= tFound > +# > +# Since 1.7 1.8 Interface seems okay; I didn't closely review the code leading up to it (but do think your array of blockers, containing a ready-to-return error message, is kind of slick) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --SsAmpcvdfeDkwq18Clmx5sbfmusvBJfb4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSj8KQAAoJEKeha0olJ0Nq2xMH/RoMcKwaD+I57mtPyTx9B/HQ XqwHci4fWdVOZiKJbZXnFeKeS/+r9sanAkMAuT3QTLH7zPX16Ehcv5ppptV5VfRV j9RG+y4Biq8KBlpbW9Y4Je7xdCqnCXbz32MnJeRGLgPo3DTgPawnwT6IYLQS0FeR 57o2ylcu5L8ukVJwZ57xFJdgpF6ZkwhNvpkGg4xCnDRTLf4LONwu0lt7vJBPwnEU 9uqLQ5tRegHqry9JyoRkmGydooKOVV1J8KHrOyytJ1JljTu/inHRa3uDuDcfxtV3 pc4stfMkZPHK/3QObDjFKfmTARpXF3L2H4avKNR6pnVs2dYml/6vaU8EG8PlCo0= =SSqw -----END PGP SIGNATURE----- --SsAmpcvdfeDkwq18Clmx5sbfmusvBJfb4--