]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage_util: fix qemu-img sparse allocation
authorPavel Hrdina <phrdina@redhat.com>
Tue, 25 Aug 2020 13:09:53 +0000 (15:09 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 25 Aug 2020 14:53:13 +0000 (16:53 +0200)
commit81a3042a12c7c06adc8e95264b6143b2eeb4953f
tree14ce930b07bef1bc937dc538a5d8b280653211a0
parent1b5bf7d540ce6998418192f13c2638d7e0d4652f
storage_util: fix qemu-img sparse allocation

Commit <c9ec7088c7a3f4cd26bb471f1f243931fff6f4f9> introduced a support
to fully allocate qcow2 images when <allocation> matches <capacity> but
it doesn't work as expected.

The issue is that info.size_arg is in KB but the info.allocation
introduced by the mentioned commit is in B. This results in using
"preallocation=falloc," in cases where "preallocation=metadata," should
be used.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/storage/storage_util.c