qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH RFC] meson: add option to use zstd for qcow2 compression by d


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH RFC] meson: add option to use zstd for qcow2 compression by default
Date: Tue, 22 Jun 2021 13:16:30 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

21.06.2021 18:59, Kevin Wolf wrote:
Am 21.06.2021 um 10:22 hat Paolo Bonzini geschrieben:
On 17/06/21 21:51, Vladimir Sementsov-Ogievskiy wrote:
So, it's an RFC. I also can split the patch so that refactoring of
qcow2_co_create() go in a separate preparation patch.

Another RFC question, shouldn't we move to zstd by default in upstream
too?

I think backwards-incompatible changes in the past were not handled with
build options, but that can be changed.

However I would prefer to have an option like
--with-qcow2-compression={zstd,zlib}.  Meson supports multiple-choice
options, they don't have to use enabled/disabled or (if boolean) true/false.

Yes, this is more extensible.

Looks good, I'll try. I'm just not familiar with it and followed the pattern of 
zstd option.


Regarding changing the default, that would make images unreadable to QEMU
5.0 and earlier versions.  Does that apply to images that have no compressed
clusters?

I think it does because you could be writing compressed clusters to it
later.

I'm afraid it does anyway: incompatible feature bit is in use for the feature. 
Older Qemu will refuse opening image with incompatible bit

Originally, we had only 'qemu-img convert -c' that could write
compressed clusters, but today the backup job can write them, too, and
it doesn't create the image file itself.


More details:

- compression type is specified once, when image is created by qemu-img create 
Or blockdev-create. At that time incompatible bit is set if zstd is chosen.

- compressed writes are done by
  - qemu-img convert -c
  - backup jobs (blockdev-backup adn drive-backup) when option compress is set 
to true
  - compress filter (which is available to insert where user wants)

- drive-backup may create target image automatically or use existing image 
depending on options.

I have a plan to deprecate drive-backup (patches are somewhere in the list and 
waits for possibility to deprecate union fields in QAPI).

I think preferred way of compression would be compress-filter, and we may want 
to deprecate compress option of blockdev-backup at some moment.


--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]