On 9/4/19 10:29 AM, Denis Plotnikov wrote: > 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 2x faster than ZLIB providing a comparable compression ratio > and therefore provides a performance advantage in backup scenarios. > > The default compression is ZLIB. Images created with ZLIB compression type > are backward compatible with older qemu versions. > > Signed-off-by: Denis Plotnikov <dplotni...@virtuozzo.com> > ---
> +++ b/docs/interop/qcow2.txt > @@ -165,6 +170,18 @@ in the description of a field. > Length of the header structure in bytes. For version 2 > images, the length is always assumed to be 72 bytes. > > + 104 - 107: compression_type > + Defines the compression method used for compressed > clusters. > + A single compression type is applied to all compressed > image > + clusters. > + The compression type is set on image creation only. This sentence adds nothing for me; you could delete it, and the spec would still be just as useful (and less questionable about whether I can 'qemu-img amend' an image to use a different compression type in-place by rewriting all existing compressed clusters). With or without that sentence, Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature