[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH v2] [RFC] qcow2: add compression ty
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH v2] [RFC] qcow2: add compression type feature |
Date: |
Wed, 22 May 2019 12:34:57 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Mon 20 May 2019 08:20:23 AM CEST, Denis Plotnikov wrote:
> + /* Compression type extension */
> + if (s->compression_type != 0) {
> + Qcow2CompressionTypeExt comp_header = {
> + .compression_type = cpu_to_be32(s->compression_type),
> + };
Shouldn't we have an enum to define the available compression types
instead of using numeric constants in the code?
> +== Compression type extension ==
> +
> +The compression type extension is an optional header extension. It stores the
> +ID of the compressor which has to be used to compress/decompress disk
> clusters.
> +A single compression type is applied to all compressed disk clusters,
s/the ID of the compressor/the ID of the compression algorithm/
> +Available compression types:
> + ID 0: Invalid value
> + 1: ZSTD
Why is 0 invalid ?
Also: do we need a way to define the compression level?
Berto