The patch adds some preparation parts for incompatible compression type
feature to Qcow2 that indicates which allow to use different compression
methods for image clusters (de)compressing.
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, and thus,
for all image clusters.
The goal of the feature is to add support of other compression methods
to qcow2. For example, ZSTD which is more effective on compression
than ZLIB.
The default compression is ZLIB. Images created with ZLIB compression
type
are backward compatible with older qemu versions.
Signed-off-by: Denis Plotnikov <address@hidden>
---
block/qcow2.c | 105 ++++++++++++++++++++++++++++++++++++++
block/qcow2.h | 31 ++++++++---
include/block/block_int.h | 1 +
qapi/block-core.json | 22 +++++++-
4 files changed, 150 insertions(+), 9 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 3c754f616b..2ccb2cabd1 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c