Skip to content

block/qcow2: add compression_algorithm create option

Peter Lieven qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4block/qcow2: add compression_algorithm create optionblock/qcow2.c block/qcow2.h docs/interop/qcow2.txt +2 more+138 -2810 replies
2/4block/qcow2: optimize qcow2_co_pwritev_compressedblock/qcow2.c+7 -50 replies
3/4block/qcow2: add lzo compression algorithmblock/qcow2-cluster.c block/qcow2.c block/qcow2.h +2 more+95 -460 replies
4/4block/qcow2: add zlib-fast compression algorithmblock/qcow2-cluster.c block/qcow2.c block/qcow2.h +1 more+13 -35 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] block/qcow2: add compression_algorithm create option

this adds a create option for QCOW2 images to specify the compression algorithm for compressed clusters. The series adds 3 algorithms to choose from:
zlib (default), zlib-fast and lzo. zlib-fast optimizes the zlib parameters without the need for an additional compression library. lzo is choosen as we already link against it and its widely available. Further libraries like zstd are in preparation.

Compression time vs. size of an uncompressed Debian 9 QCOW2 image (size 1148MB):

zlib         35.7s     339MB
zlib-fast    12.8s     348MB
lzo          4.2s      429MB

Peter Lieven (4):
block/qcow2: add compression_algorithm create option block/qcow2: optimize qcow2_co_pwritev_compressed block/qcow2: add lzo compression algorithm block/qcow2: add zlib-fast compression algorithm

 block/qcow2-cluster.c     |  66 ++++++++++------
 block/qcow2.c             | 186 +++++++++++++++++++++++++++++++++++++---------
 block/qcow2.h             |  22 ++++--
 configure                 |   2 +-
 docs/interop/qcow2.txt    |   8 +-
 include/block/block_int.h |  35 ++++-----
 qemu-img.texi             |  12 +++
 7 files changed, 251 insertions(+), 80 deletions(-)
Signature · 1 line
1.9.1