]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: refcount_order parameter for qcow2_create2
authorMax Reitz <mreitz@redhat.com>
Wed, 18 Feb 2015 22:40:46 +0000 (17:40 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 10 Mar 2015 13:02:21 +0000 (14:02 +0100)
commitbd4b167f84840865b788e9f236585f77a77b10fc
treeead7cfe670020bceae762214285ef4a636990d5c
parentb72faf9f78377e38342f78ffacdfa0726f5e7511
qcow2: refcount_order parameter for qcow2_create2

Add a refcount_order parameter to qcow2_create2(), use that value for
the image header and for calculating the size required for
preallocation.

For now, always pass 4.

This addition requires changes to the calculation of the file size for
the "full" and "falloc" preallocation modes. That in turn is a nice
opportunity to add a comment about that calculation not necessarily
being exact (and that being intentional).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c