]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage_file: add support to probe cluster_size from QCOW2 images
authorPavel Hrdina <phrdina@redhat.com>
Wed, 12 May 2021 15:44:19 +0000 (17:44 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 21 May 2021 12:00:55 +0000 (14:00 +0200)
commit93344aed27c686239ff53b8912eb4476be5e9ef7
tree2bb975091d9e6165c7b5b0359dc6755f830730a7
parent3e1d2c93a3edce65ce8cb589edb07e2f830c9c12
storage_file: add support to probe cluster_size from QCOW2 images

From QEMU docs/interop/qcow2.txt :

   Byte  20 - 23:   cluster_bits
                    Number of bits that are used for addressing an offset
                    within a cluster (1 << cluster_bits is the cluster size).

With this patch libvirt will be able to report the current cluster_size
for all existing storage volumes managed by storage driver.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/storage/storage_util.c
src/storage_file/storage_file_probe.c