]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: extend preallocation flags support for qemu-img
authorWim ten Have <wim.ten.have@oracle.com>
Mon, 9 Apr 2018 18:14:35 +0000 (20:14 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Apr 2018 08:15:58 +0000 (10:15 +0200)
commitc9ec7088c7a3f4cd26bb471f1f243931fff6f4f9
treeb400c05c2c2780647440d3abbaf8c06d3095f091
parentc1bc9c662b411f8fa06071991921a180480a0f40
storage: extend preallocation flags support for qemu-img

This patch adds support to qcow2 formatted filesystem object storage by
instructing qemu-img to build them with preallocation=falloc whenever the
XML described storage <allocation> matches its <capacity>.  For all other
cases the filesystem stored objects are built with preallocation=metadata.

Signed-off-by: Wim ten Have <wim.ten.have@oracle.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/storage/storage_util.c
tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv