From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Lrp-0007xu-9r for qemu-devel@nongnu.org; Mon, 16 May 2016 12:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2Lrl-00011l-Gt for qemu-devel@nongnu.org; Mon, 16 May 2016 12:59:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Lrl-00011Z-8I for qemu-devel@nongnu.org; Mon, 16 May 2016 12:59:37 -0400 References: <1463229957-14253-1-git-send-email-den@openvz.org> <1463229957-14253-7-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <5739FC77.9090209@redhat.com> Date: Mon, 16 May 2016 10:59:35 -0600 MIME-Version: 1.0 In-Reply-To: <1463229957-14253-7-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lBEnPdou7LAMQvgXXsB0OBgDxDD8F5ufT" Subject: Re: [Qemu-devel] [PATCH 06/10] drive-backup: added support for data compression List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , qemu-devel@nongnu.org Cc: Pavel Butsykin , Jeff Cody , Markus Armbruster , John Snow , Stefan Hajnoczi , Kevin Wolf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lBEnPdou7LAMQvgXXsB0OBgDxDD8F5ufT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin >=20 > The idea is simple - backup is "written-once" data. It is written block= > by block and it is large enough. It would be nice to save storage > space and compress it. >=20 > The patch adds a flag to the qmp/hmp drive-backup command which enables= > block compression. Compression should be implemented in the format driv= er > to enable this feature. >=20 > There are some limitations of the format driver to allow compressed wri= tes. > We can write data only once. Though for backup this is perfectly fine. > These limitations are maintained by the driver and the error will be > reported if we are doing something wrong. >=20 > +++ b/qapi/block-core.json > @@ -905,7 +905,7 @@ > { 'struct': 'DriveBackup', > 'data': { 'device': 'str', 'target': 'str', '*format': 'str', > 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', > - '*speed': 'int', '*bitmap': 'str', > + '*speed': 'int', '*bitmap': 'str', '*compress': 'bool', Missing documentation of the new option. > '*on-source-error': 'BlockdevOnError', > '*on-target-error': 'BlockdevOnError' } } > =20 > diff --git a/qmp-commands.hx b/qmp-commands.hx > index 94847e5..8915a0b 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -1186,7 +1186,8 @@ EQMP > { > .name =3D "drive-backup", > .args_type =3D "sync:s,device:B,target:s,speed:i?,mode:s?,for= mat:s?," > - "bitmap:s?,on-source-error:s?,on-target-error:s?= ", > + "bitmap:s?,compress:b?," > + "on-source-error:s?,on-target-error:s?", > .mhandler.cmd_new =3D qmp_marshal_drive_backup, > }, > =20 > @@ -1220,6 +1221,7 @@ Arguments: > - "mode": whether and how QEMU should create a new image > (NewImageMode, optional, default 'absolute-paths') > - "speed": the maximum speed, in bytes per second (json-int, optional)= > +- "compress": compress data blocks (if the target format supports it).= Missing mention that it is optional, default false. > - "on-source-error": the action to take on an error on the source, def= ault > 'report'. 'stop' and 'enospc' can only be used > if the block device supports io-status. >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --lBEnPdou7LAMQvgXXsB0OBgDxDD8F5ufT 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/ iQEcBAEBCAAGBQJXOfx3AAoJEKeha0olJ0NqRVMH/328K5IouIFtL9yWF6mL3o53 R+M1fu3uwr5df2YQ1FHAgKa7BJowgLaDZk0xRXqZXS8QBArYZrcjBqGBjjWie5EU DXSgy/e/ZMJqmFpKP9LPP1OrZ+YuiARwwyG8OQk1dK8BT7AgviFTnfwMtQh0loH7 eDa8jop3MaXkoWSoPkP+LfZGK/38n2NeH5HwlqNtsH2Cn+swdq4XqEfum/vZZrWe BBdWk2JQ9gwTJ9qvrAkIwFEoUjUCGxNhdJCIJm+KlfMizVoaDORG1y3rthNBU67k uuB/fVm0RS14rvE3cOAUNa1duTnOf0zhOg1FeZcRGgdobK4GHeDJj6sI8FN9hgQ= =5WrT -----END PGP SIGNATURE----- --lBEnPdou7LAMQvgXXsB0OBgDxDD8F5ufT--