aboutsummaryrefslogtreecommitdiff
path: root/win_dump.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-04-15 16:34:30 +0200
committerKevin Wolf <kwolf@redhat.com>2019-04-30 15:29:00 +0200
commit718c0fce2f56755a8d8f737607779a98aa6e7cc4 (patch)
tree5a87a739fe8e427fa9c4291faa9f2722eed9e197 /win_dump.h
parent360bd07471dfd1830246e8403ffdc9ba9d82f9d4 (diff)
downloadqemu-718c0fce2f56755a8d8f737607779a98aa6e7cc4.zip
qemu-718c0fce2f56755a8d8f737607779a98aa6e7cc4.tar.gz
qemu-718c0fce2f56755a8d8f737607779a98aa6e7cc4.tar.bz2
qcow2: Fix full preallocation with external data file
preallocate_co() already gave the data file the full size without forwarding the requested preallocation mode to the protocol. When bdrv_co_truncate() was called later with the preallocation mode, the file didn't actually grow any more, so the data file stayed unallocated even if full preallocation was requested. Pass the right preallocation mode to preallocate_co() and remove the second bdrv_co_truncate() to fix this. As a side effect, the ugly one-byte write in preallocate_co() is replaced with a truncate call, now leaving the last block unallocated on the protocol level as it should be. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'win_dump.h')
0 files changed, 0 insertions, 0 deletions