From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, vsementsov@virtuozzo.com,
qemu-block@nongnu.org, armbru@redhat.com, mreitz@redhat.com,
dplotnikov@virtuozzo.com, den@openvz.org
Subject: [PATCH v9 2/2] docs: qcow2: introduce compression type feature
Date: Mon, 16 Dec 2019 15:17:33 +0300 [thread overview]
Message-ID: <20191216121733.63562-3-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20191216121733.63562-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 | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt
index d92c827763..77146b5169 100644
--- a/docs/interop/qcow2.txt
+++ b/docs/interop/qcow2.txt
@@ -109,6 +109,11 @@ the next fields through header_length.
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. compression_type field must be
+ present and not zero.
+
Bits 3-63: Reserved (set to 0)
80 - 87: compatible_features
@@ -188,7 +193,16 @@ present*, if not altered by specific incompatible bit.
*. Field is not present when header_length is less or equal to field's offset.
Also, all additional fields are not present for version 2.
- < ... 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
+ be present and non-zero (which means non-zlib compression type)
+ If incompatible compression type bit is unset: the field
+ may not exist or it must be zero (which means zlib).
+ Available compression type values:
+ 0: zlib <https://www.zlib.net/>
Header padding
--
2.18.0
next prev parent reply other threads:[~2019-12-16 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 12:17 [PATCH v9 0/2] qcow2: add zstd cluster compression Vladimir Sementsov-Ogievskiy
2019-12-16 12:17 ` [PATCH v9 1/2] docs: improve qcow2 spec about extending image header Vladimir Sementsov-Ogievskiy
2020-01-20 16:03 ` Max Reitz
2020-01-20 16:40 ` Vladimir Sementsov-Ogievskiy
2019-12-16 12:17 ` Vladimir Sementsov-Ogievskiy [this message]
2020-01-20 16:14 ` [PATCH v9 2/2] docs: qcow2: introduce compression type feature Max Reitz
2020-01-20 16:38 ` Vladimir Sementsov-Ogievskiy
2020-01-20 9:12 ` [PATCH v9 0/2] qcow2: add zstd cluster compression Vladimir Sementsov-Ogievskiy
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=20191216121733.63562-3-vsementsov@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--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).