qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* ImageInfo oddities regarding compression
@ 2020-11-27 10:06 Markus Armbruster
  2020-11-27 10:14 ` Daniel P. Berrangé
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Armbruster @ 2020-11-27 10:06 UTC (permalink / raw)
  To: Kevin Wolf, Max Reitz, Denis Plotnikov, qemu-devel, qemu-block

ImageInfo has an optional member @compressed:

    ##
    # @ImageInfo:
    [...]
    # @compressed: true if the image is compressed (Since 1.7)

Doc bug: neglects to specify the default.  I guess it's false.

The only user appears to be vmdk_get_extent_info().  Goes back to
v1.7.0's commits

    f4c129a38a vmdk: Implment bdrv_get_specific_info
    cbe82d7fb3 qapi: Add optional field 'compressed' to ImageInfo

ImageInfo also has an optional member @format-specific.

Doc bug: neglects to specify when it's present.  I assume it's always
present when member @format has a value that has a non-empty variant in
@format-specific's type ImageInfoSpecific.

Format qcow2's variant is ImageInfoSpecificQCow2.  It has a mandatory
member @compression-type.

   ##
   # @Qcow2CompressionType:
   #
   # Compression type used in qcow2 image file
   #
   # @zlib: zlib compression, see <http://zlib.net/>
   # @zstd: zstd compression, see <http://github.com/facebook/zstd>
   #
   # Since: 5.1
   ##
   { 'enum': 'Qcow2CompressionType',
     'data': [ 'zlib', { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }

Apparently, you can't have a qcow2 image without compression.  Correct?

Can you imagine a use case for "without compression"?

I fell down this (thankfully shallow) rabbit hole because we also have

    { 'enum': 'MultiFDCompression',
      'data': [ 'none', 'zlib',
                { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }

I wonder whether we could merge them into a common type.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-30 17:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 10:06 ImageInfo oddities regarding compression Markus Armbruster
2020-11-27 10:14 ` Daniel P. Berrangé
2020-11-27 10:32   ` Kevin Wolf
2020-11-27 12:21     ` Markus Armbruster
2020-11-27 15:25       ` Kevin Wolf
2020-11-27 16:52         ` Markus Armbruster
2020-11-30 17:36           ` Daniel P. Berrangé
2020-11-30 17:24     ` Eric Blake

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).