From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, den@virtuozzo.com,
armbru@redhat.com, qemu-devel@nongnu.org,
dplotnikov@virtuozzo.com, mreitz@redhat.com
Subject: [PATCH v7 2/2] docs: qcow2: introduce compression type feature
Date: Mon, 7 Oct 2019 19:04:51 +0300 [thread overview]
Message-ID: <20191007160451.27334-3-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20191007160451.27334-1-vsementsov@virtuozzo.com>
The patch add new additional field to qcow2 header: compression_type,
which specifies compression type. If field is absent or zero, default
compression type is set: ZLIB, which corresponds to current behavior.
New compression type (ZSTD) is to be added in further commit.
Suggested-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
docs/interop/qcow2.txt | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt
index 3f2855593f..82ec0845d8 100644
--- a/docs/interop/qcow2.txt
+++ b/docs/interop/qcow2.txt
@@ -109,6 +109,12 @@ least next five fields, up to the @header_length field.
An External Data File Name header extension may
be present if this bit is set.
+ Bit 3: Compression type bit. If this bit is set,
+ non-default compression is used for compressed
+ clusters. In this case, @header_length must
+ be at least 108 and @compression_type field
+ must be non-zero.
+
Bits 3-63: Reserved (set to 0)
80 - 87: compatible_features
@@ -183,7 +189,18 @@ This definition implies the following:
3. If we want to add incompatible field (or a field, for which some its values
would be incompatible), it must be accompanied by incompatible feature bit.
- < ... No additional fields in the header currently ... >
+ 104: compression_type
+ Defines the compression method used for compressed clusters.
+ A single compression type is applied to all compressed image
+ clusters.
+ If incompatible compression type bit is set: the field must
+ exist (i.e. @header_length >= 105) and must be non-zero (
+ which means non-zlib compression type)
+ If incompatible compression type bit is unset: the field
+ may not exist (if @header_length < 105) or it must be zero
+ (which means zlib).
+ Available compression type values:
+ 0: zlib <https://www.zlib.net/>
Directly after the image header, optional sections called header extensions can
be stored. Each extension has a structure like the following:
--
2.21.0
prev parent reply other threads:[~2019-10-07 16:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 16:04 [PATCH v7 0/2] qcow2: add zstd cluster compression Vladimir Sementsov-Ogievskiy
2019-10-07 16:04 ` [PATCH v7 1/2] docs: improve qcow2 spec about extending image header Vladimir Sementsov-Ogievskiy
2019-10-07 20:21 ` Eric Blake
2019-10-08 9:05 ` Vladimir Sementsov-Ogievskiy
2019-10-18 8:29 ` Vladimir Sementsov-Ogievskiy
2019-10-18 9:27 ` Vladimir Sementsov-Ogievskiy
2019-10-18 13:39 ` Eric Blake
2019-10-18 13:54 ` Vladimir Sementsov-Ogievskiy
2019-10-07 16:04 ` Vladimir Sementsov-Ogievskiy [this message]
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=20191007160451.27334-3-vsementsov@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@virtuozzo.com \
--cc=dplotnikov@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).