From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXGlZ-0007TO-8j for qemu-devel@nongnu.org; Mon, 07 Apr 2014 17:07:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXGlU-0002dt-BE for qemu-devel@nongnu.org; Mon, 07 Apr 2014 17:07:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXGlU-0002dg-12 for qemu-devel@nongnu.org; Mon, 07 Apr 2014 17:07:36 -0400 Message-ID: <53431393.8070304@redhat.com> Date: Mon, 07 Apr 2014 15:07:31 -0600 From: Eric Blake MIME-Version: 1.0 References: <1394436370-8908-1-git-send-email-famz@redhat.com> <1394436370-8908-11-git-send-email-famz@redhat.com> In-Reply-To: <1394436370-8908-11-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hE8TuwvqiF1jh0FrFETLNHuHTG89g1aIV" Subject: Re: [Qemu-devel] [PATCH v17 10/14] 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, benoit.canet@irqsave.net, rjones@redhat.com, jcody@redhat.com, armbru@redhat.com, ptoscano@redhat.com, imain@redhat.com, stefanha@redhat.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hE8TuwvqiF1jh0FrFETLNHuHTG89g1aIV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/10/2014 01:26 AM, 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 > Add check and report error for bs =3D=3D target which became possible b= ut is > an illegal case with introduction of blockdev-backup. >=20 > Signed-off-by: Fam Zheng > --- > block/backup.c | 26 ++++++++++++++++++++++++++ > blockdev.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > qapi-schema.json | 49 ++++++++++++++++++++++++++++++++++++++++++++++++= + > qmp-commands.hx | 44 ++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 166 insertions(+) Reviewing just QAPI portion: > +++ b/qapi-schema.json > @@ -1919,6 +1919,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. > +# > +# @sync: what parts of the disk image should be copied to the destinat= ion > +# (all the disk, only the sectors allocated in the topmost imag= e, or > +# only new I/O). > +# > +# @speed: #optional the maximum speed, in bytes per second. > +# > +# @on-source-error: #optional the action to take on an error on the so= urce, > +# default 'report'. 'stop' and 'enospc' can only be= used > +# if the block device supports io-status (see BlockI= nfo). > +# > +# @on-target-error: #optional the action to take on an error on the ta= rget, > +# default 'report' (no limitations, since this appli= es to > +# a different block device than @device). > +# > +# 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: 2.0 2.1 now > +## > +{ 'type': 'BlockdevBackup', > + 'data': { 'device': 'str', 'target': 'str', > + 'sync': 'MirrorSyncMode', > + '*speed': 'int', > + '*on-source-error': 'BlockdevOnError', > + '*on-target-error': 'BlockdevOnError' } } > + Looks reasonable > +# If @device or @target is not a valid block device, DeviceNo= tFound. > +# > +# Since 2.0 > +## > +{ 'command': 'blockdev-backup', 'data': 'BlockdevBackup' } Another case of 2.1 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hE8TuwvqiF1jh0FrFETLNHuHTG89g1aIV 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTQxOTAAoJEKeha0olJ0NqXuMH/3mmrS5OqKC0Au2o776uovDY q18SdJ44w0Qrr6kNjI6irfX/Yl6PpxO4gWvq4mic7br5o/yRgtdE9WmKWcIe9i3+ MkjM7B+n0ZDtjk/KqV/0MVL0Vhg6JrQc4WOMyxtOZ+ILd26pdO24TbcrdzbGuZ0t mtxXKoz1FYceDg2UMBA28ZHfk27dQC6KtV1yDTcxlbfvKoTly6MURyV2RHPNzCko ZzxlY+y3PIA/tVfEuYjyAkAaaj5bfFm90Or34mV6Mfi4pulsp9SihHCqJxz0Q9b6 0dtaXxd++0hX7GY6GdEk4I6YlecNofT13+MyAOyJP/tisIGRDykM2j62RMWZkas= =R3Tx -----END PGP SIGNATURE----- --hE8TuwvqiF1jh0FrFETLNHuHTG89g1aIV--