From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYJo-0003SO-UQ for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:18:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYJj-0005V8-Sz for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:18:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYJj-0005Uv-Ku for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:18:39 -0400 References: <1464686130-12265-1-git-send-email-den@openvz.org> <1464686130-12265-9-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <575F151E.6080608@redhat.com> Date: Mon, 13 Jun 2016 14:18:38 -0600 MIME-Version: 1.0 In-Reply-To: <1464686130-12265-9-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ehxN6WcROmbkcUbPf0KmpnIunMnSLxt8L" Subject: Re: [Qemu-devel] [PATCH 08/11] 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) --ehxN6WcROmbkcUbPf0KmpnIunMnSLxt8L Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/31/2016 03:15 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 > @@ -3309,6 +3315,7 @@ void qmp_drive_backup(const char *device, const c= har *target, > bool has_mode, enum NewImageMode mode, > bool has_speed, int64_t speed, > bool has_bitmap, const char *bitmap, > + bool has_compress, bool compress, > bool has_on_source_error, BlockdevOnError on_sou= rce_error, > bool has_on_target_error, BlockdevOnError on_tar= get_error, > Error **errp) Might be nice to simplify this signature once my qapi 'box' patches land.= > +++ b/qapi/block-core.json > @@ -888,6 +888,9 @@ > # Must be present if sync is "incremental", must NOT be prese= nt > # otherwise. (Since 2.4) > # > +# @compress: #optional the compression data blocks (if the target form= at > +# supports it; default: false). Missing a '(since 2.7)' notation. > +++ 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,8 @@ 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": the compression data blocks (if the target format suppor= ts it). > + (json-bool, optional, default false) Reads awkwardly; maybe "compress": true to compress data, if the target format supports it. (json-bool, optional, default false) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ehxN6WcROmbkcUbPf0KmpnIunMnSLxt8L 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/ iQEcBAEBCAAGBQJXXxUeAAoJEKeha0olJ0NqL8YIAJ8IQrr5WPHSaJKIKSFL4l0i lUaj5ILmWmNICxAApxjJzEVB+FJ5gg++cXxAqhOULci9qiu0RM5LFxV1wA82VI8i 1NM1vg8D2W5YAdthb01k7rPnNoRu4PRk32YdGtU+ic37iipP6ljIUTxChH5Y1uKS /DEsGALa4qARAeSW/xZhJXeCvD+Vuvp60xFEaAfUIfmfJV6KhOzKzDIC5VgR7JIr FazW6P8Ciut+e31AI2KQiSLPNVKh5PUHV48LVWl+BahPiFuvNuK0/xAmT/1uaBot Tk/IQh+Qd400OH00xIodbrObeyEypeaQ+GzDQu51uXlUQTQOM8H9BBtbEls/kZA= =Ssoi -----END PGP SIGNATURE----- --ehxN6WcROmbkcUbPf0KmpnIunMnSLxt8L--