From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlgcF-0006p4-9Q for qemu-devel@nongnu.org; Tue, 04 Nov 2014 11:06:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlgc8-00018n-Ci for qemu-devel@nongnu.org; Tue, 04 Nov 2014 11:05:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlgc8-00018c-5d for qemu-devel@nongnu.org; Tue, 04 Nov 2014 11:05:48 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA4G5lE6012725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 4 Nov 2014 11:05:47 -0500 Message-ID: <5458F959.9040703@redhat.com> Date: Tue, 04 Nov 2014 17:05:45 +0100 From: Eric Blake MIME-Version: 1.0 References: <1414979247-11194-1-git-send-email-famz@redhat.com> <1414979247-11194-2-git-send-email-famz@redhat.com> In-Reply-To: <1414979247-11194-2-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e2fuqkHaPLFdj5ehotM1ARC50C4UcHxCi" Subject: Re: [Qemu-devel] [PATCH v2 RESEND 1/4] 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: Kevin Wolf , pbonzini@redhat.com, Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e2fuqkHaPLFdj5ehotM1ARC50C4UcHxCi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/03/2014 02:47 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 | 28 +++++++++++++++++++++++++++ > blockdev.c | 47 ++++++++++++++++++++++++++++++++++++++++++++= ++ > qapi/block-core.json | 53 ++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > qmp-commands.hx | 44 +++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 172 insertions(+) >=20 > +++ b/qapi/block-core.json > @@ -674,6 +674,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. Maybe mention 'the default is 0, for unlimited'? > +# > +# @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.2 Is 2.2 still the target since this missed soft freeze, or has it slipped to 2.3? Particularly since... > +## > +{ 'type': 'BlockdevBackup', > + 'data': { 'device': 'str', 'target': 'str', > + 'sync': 'MirrorSyncMode', > + '*speed': 'int', > + '*on-source-error': 'BlockdevOnError', > + '*on-target-error': 'BlockdevOnError' } } > + > +## > # @blockdev-snapshot-sync > # > # Generates a synchronous snapshot of a block device. > @@ -793,6 +827,25 @@ > { 'command': 'drive-backup', 'data': 'DriveBackup' } > =20 > ## > +# @blockdev-backup > +# > +# Start a point-in-time copy of a block device to a new destination. = The > +# status of ongoing blockdev-backup operations can be checked with > +# query-block-jobs where the BlockJobInfo.type field has the value 'ba= ckup'. This reuses the same job type as 'drive-backup'; but that seems okay to m= e. > +# The operation can be stopped before it has completed using the > +# block-job-cancel command. > +# > +# 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 2.3 =2E..you mixed in 2.3 here. > +SQMP > +blockdev-backup > +------------ > + > +The device version of drive-backup: this command takes a existing name= d device s/a existing/an existing/ --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --e2fuqkHaPLFdj5ehotM1ARC50C4UcHxCi 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 iQEcBAEBCAAGBQJUWPlZAAoJEKeha0olJ0NqkbYH/jz5TJcGYmwyGbCoVjHfYNWy bUuOoX8LDJR2+sVdl3Unz0atl69I++p800ONAVET6/vLJB0GFy3kIv+kDw4CiupY vyxyrzEXhqb/5mH2EMnUaCc0KFDo9BIFTD9R2YmoFTaez8vTAL28La2Tvh0HluEQ ixYOYGOX6YTAkcFag7AxxWMDWwS+6UIruZjnhQ/H8L9Q16QD6zii7HhGhzkuwVPd ESdxUa/vttoQPG9CllISl1T2QmYCr8jn/pNg8zIxy6lYaUAXKRo77Wasyod3xdcd rVAcRrCnggNZ4/DaJGoPRzVVpwiARD45nSh8vmhl+YKsI96Ydn1SwbVY0Mjnt7A= =rpGN -----END PGP SIGNATURE----- --e2fuqkHaPLFdj5ehotM1ARC50C4UcHxCi--