qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: qemu-block@nongnu.org, kwolf@redhat.com, qemu-devel@nongnu.org,
	mreitz@redhat.com, den@openvz.org, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/4] block/qcow2: add compression_algorithm create option
Date: Tue, 27 Jun 2017 14:20:40 +0100	[thread overview]
Message-ID: <20170627132040.GH13634@redhat.com> (raw)
In-Reply-To: <1498566850-7934-2-git-send-email-pl@kamp.de>

On Tue, Jun 27, 2017 at 02:34:07PM +0200, Peter Lieven wrote:
> this patch adds a new compression_algorithm option when creating qcow2 images.
> The current default for the compresison algorithm is zlib and zlib will be
> used when this option is omitted (like before).
> 
> If the option is specified e.g. with:
> 
>  qemu-img create -f qcow2 -o compression_algorithm=zlib image.qcow2 1G

IMHO we should introduce a nested struct "compress" struct to hold the format
name, and any other format specific arguments, in a way that maps nicely to
any future QAPI representmatch of create options. eg

{ 'enum': 'BlockdevQcow2CompressFormat',
  'data': [ 'zlib', 'lzo' ] }

{ 'union': 'BlockdevQcow2Compress',
  'base': { 'format': 'BlockdevQcow2CompressFormat' },
  'discriminator': 'format',
  'data': { 'zlib': 'BlockdevQcow2CompressZLib',
            'lzo': 'BlockdevQcow2CompressLZO'} }

so it would map to

 qemu-img create -f qcow2 -o compress.format=zlib image.qcow2 1G

and let us have other compress.XXXX options specific to each format

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  parent reply	other threads:[~2017-06-27 13:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 12:34 [Qemu-devel] [PATCH 0/4] block/qcow2: add compression_algorithm create option Peter Lieven
2017-06-27 12:34 ` [Qemu-devel] [PATCH 1/4] " Peter Lieven
2017-06-27 12:49   ` Eric Blake
2017-06-27 14:49     ` Peter Lieven
2017-06-27 15:04       ` Eric Blake
2017-06-27 15:11         ` Peter Lieven
2017-06-27 15:13           ` Peter Lieven
2017-07-03 19:45         ` Peter Lieven
2017-06-27 13:20   ` Daniel P. Berrange [this message]
2017-06-27 13:27     ` Peter Lieven
2017-06-28 14:50       ` Denis V. Lunev
2017-06-28 14:54   ` Denis V. Lunev
2017-06-27 12:34 ` [Qemu-devel] [PATCH 2/4] block/qcow2: optimize qcow2_co_pwritev_compressed Peter Lieven
2017-06-27 12:34 ` [Qemu-devel] [PATCH 3/4] block/qcow2: add lzo compression algorithm Peter Lieven
2017-06-27 12:34 ` [Qemu-devel] [PATCH 4/4] block/qcow2: add zlib-fast " Peter Lieven
2017-06-27 12:53   ` Eric Blake
2017-06-27 13:14     ` Peter Lieven
2017-06-27 13:16   ` Daniel P. Berrange
2017-06-27 13:23     ` Peter Lieven
2017-06-27 13:46       ` Daniel P. Berrange

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=20170627132040.GH13634@redhat.com \
    --to=berrange@redhat.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pl@kamp.de \
    --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).