[libvirt PATCH v2 1/2] storage: add support for QCOW2 cluster_size option

Peter Krempa pkrempa at redhat.com
Fri May 21 07:43:03 UTC 2021

On Thu, May 20, 2021 at 17:14:31 +0200, Pavel Hrdina wrote:
> The default value hard-coded in QEMU (64KiB) is not always the ideal.
> Having a possibility to set the cluster_size by user may in specific
> use-cases improve performance for QCOW2 images.
> QEMU internally has some limits, the value has to be between 512B and
> 2048KiB and must by power of two, except when the image has Extended L2
> Entries the minimal value has to be 16KiB.
> Since qemu-img ensures the value is correct and the limit is not always
> the same libvirt will not duplicate any of these checks as the error
> message from qemu-img is good enough:
>     Cluster size must be a power of two between 512 and 2048k
> Resolves: https://gitlab.com/libvirt/libvirt/-/issues/154
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> Changes in v2:
>     - Documentation now describes only what can be affected by changing
>       cluster_size.

Reviewed-by: Peter Krempa <pkrempa at redhat.com>

More information about the libvir-list mailing list