This series adds preallocation=full to qcow2 and raw: Option preallocation=full preallocates disk space for image by calling posix_fallocate() if it's available, otherwise by writing zeros to disk.
Max, Eric, Fam, I removed your Reviewed-by line in all patches since they've been changed. You're welcome to review again! changes to v12: - remove dependence on minimal_blob_size() (patch 6) - remove preallocation=falloc. (patch 4) - preallocation=full tries posix_fallocate() first then writing zeros (patch 5) - round up file size for all formats (patch 1) - avoid converting file size for more formats (patch 2) Hu Tao (5): block: round up file size to nearest sector block: don't convert file size to sector size qapi: introduce PreallocMode and a new PreallocMode full. raw-posix: Add full preallocation option qcow2: Add full preallocation option Peter Lieven (1): rename parse_enum_option to qapi_enum_parse and make it public block/archipelago.c | 3 +- block/cow.c | 3 +- block/gluster.c | 9 ++-- block/iscsi.c | 4 +- block/nfs.c | 3 +- block/qcow.c | 7 +-- block/qcow2.c | 79 +++++++++++++++++++++++++------ block/qed.c | 3 +- block/raw-posix.c | 100 +++++++++++++++++++++++++++++---------- block/raw-win32.c | 6 +-- block/rbd.c | 3 +- block/sheepdog.c | 3 +- block/ssh.c | 3 +- block/vdi.c | 3 +- block/vhdx.c | 3 +- block/vmdk.c | 3 +- block/vpc.c | 3 +- blockdev.c | 30 +++--------- include/qapi/util.h | 17 +++++++ qapi/Makefile.objs | 1 + qapi/block-core.json | 16 +++++++ qapi/qapi-util.c | 34 +++++++++++++ qemu-doc.texi | 15 ++++-- qemu-img.texi | 15 ++++-- tests/qemu-iotests/049.out | 2 +- tests/qemu-iotests/082.out | 54 ++++++++++----------- tests/qemu-iotests/104 | 57 ++++++++++++++++++++++ tests/qemu-iotests/104.out | 12 +++++ tests/qemu-iotests/common.filter | 21 ++++++++ tests/qemu-iotests/group | 1 + 30 files changed, 393 insertions(+), 120 deletions(-) create mode 100644 include/qapi/util.h create mode 100644 qapi/qapi-util.c create mode 100755 tests/qemu-iotests/104 create mode 100644 tests/qemu-iotests/104.out -- 1.9.3