qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Denis Plotnikov <dplotnikov@virtuozzo.com>
Cc: vsementsov@virtuozzo.com, den@virtuozzo.com,
	qemu-block@nongnu.org, qemu-devel@nongnu.org, armbru@redhat.com,
	mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v0 1/3] qcow2: introduce compression type feature
Date: Fri, 28 Jun 2019 11:54:33 +0200	[thread overview]
Message-ID: <20190628095433.GD5179@dhcp-200-226.str.redhat.com> (raw)
In-Reply-To: <20190528143727.10529-2-dplotnikov@virtuozzo.com>

Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben:
> The patch adds some preparation parts for incompatible compression type
> feature to QCOW2 header that indicates that *all* compressed clusters
> must be (de)compressed using a certain compression type.
> 
> It is implied that the compression type is set on the image creation and
> can be changed only later by image conversion, thus compression type
> defines the only compression algorithm used for the image.
> 
> The goal of the feature is to add support of other compression algorithms
> to qcow2. For example, ZSTD which is more effective on compression than ZLIB.
> It works roughly x2 faster than ZLIB providing a comparable compression ratio
> and therefore provide a performance advantage in backup scenarios.
> 
> The default compression is ZLIB. Images created with ZLIB compression type
> is backward compatible with older qemu versions.
> 
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>

> @@ -3119,6 +3123,10 @@
>  #                         an image, the data file name is loaded from the image
>  #                         file. (since 4.0)
>  #
> +# @compression-type:      compression method to use for image clusters compression
> +#                         The comression method is set on image creation and can
> +#                         be changed via image converting only. (since 4.1)
> +#
>  # Since: 2.9
>  ##
>  { 'struct': 'BlockdevOptionsQcow2',
> @@ -3134,7 +3142,8 @@
>              '*refcount-cache-size': 'int',
>              '*cache-clean-interval': 'int',
>              '*encrypt': 'BlockdevQcow2Encryption',
> -            '*data-file': 'BlockdevRef' } }
> +            '*data-file': 'BlockdevRef',
> +            '*compression-type': 'Qcow2CompressionType' } }

qcow2_open() doesn't actually parse this option (and it couldn't do
anything useful with it because the image is fixed to a single
compression type), so this shouldn't be added.

>  ##
>  # @SshHostKeyCheckMode:
> @@ -4206,6 +4215,19 @@
>    'data': [ 'v2', 'v3' ] }
>  
>  
> +##
> +# @Qcow2CompressionType:
> +#
> +# Compression type used in qcow2 image file
> +#
> +# @zlib     : gzip compressor
> +# @zstd     : zstd compression
> +#
> +# Since: 4.1
> +##
> +{ 'enum': 'Qcow2CompressionType',
> +  'data': [ 'zlib', 'zstd' ] }

I think it would be cleaner to start with only 'zlib' here, like your C
code that doesn't implement anything for non-zlib compression types yet.

'zstd' can be added to the enum when it's actually implemented. This
will also make schema introspection provide the right information with a
build that includes this patch, but not the zstd compression type
patch.

Kevin


  parent reply	other threads:[~2019-06-28 10:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 14:37 [Qemu-devel] [PATCH v0 0/3] add zstd cluster compression Denis Plotnikov
2019-05-28 14:37 ` [Qemu-devel] [PATCH v0 1/3] qcow2: introduce compression type feature Denis Plotnikov
2019-05-29 11:40   ` Vladimir Sementsov-Ogievskiy
2019-06-28  9:45     ` Kevin Wolf
2019-06-27 16:35   ` Markus Armbruster
2019-06-28  9:54   ` Kevin Wolf [this message]
2019-06-28 11:07     ` Denis Plotnikov
2019-06-28 10:10   ` Kevin Wolf
2019-05-28 14:37 ` [Qemu-devel] [PATCH v0 2/3] qcow2: add compression type processing Denis Plotnikov
2019-05-29  9:47   ` Vladimir Sementsov-Ogievskiy
2019-06-28 10:23   ` Kevin Wolf
2019-06-28 11:24     ` Denis Plotnikov
2019-06-28 12:06       ` Kevin Wolf
2019-06-28 12:56         ` Denis Plotnikov
2019-06-28 14:24           ` Kevin Wolf
2019-06-28 14:40             ` Denis Plotnikov
2019-06-28 14:54               ` Kevin Wolf
2019-06-28 15:03                 ` Max Reitz
2019-06-28 15:14                   ` Denis Plotnikov
2019-06-28 19:34                 ` Eric Blake
2019-07-02 12:34                   ` Denis Plotnikov
2019-05-28 14:37 ` [Qemu-devel] [PATCH v0 3/3] qcow2: add zstd cluster compression Denis Plotnikov
2019-06-28 11:57   ` Kevin Wolf
2019-07-02 12:33     ` Denis Plotnikov
2019-07-02 12:49     ` Denis Plotnikov
2019-07-02 14:37       ` Kevin Wolf
2019-07-02 14:48         ` Denis Plotnikov
2019-06-04  7:56 ` [Qemu-devel] [PING] [PATCH v0 0/3] " Denis Plotnikov
2019-06-27 15:04   ` [Qemu-devel] [PING PING] " Denis Plotnikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190628095433.GD5179@dhcp-200-226.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).