summaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-04-15 17:17:32 +0200
committerKevin Wolf <kwolf@redhat.com>2013-04-22 10:27:58 +0200
commit16b3c5cd9f27678bc9d6707664640653b47533b9 (patch)
treef651cee5296cf7f98e270b87854dda286b40c43d /qemu-img.c
parentf4d38bef7cc79018e2aa789b0e4c23c3a8cdfca5 (diff)
downloadqemu-16b3c5cd9f27678bc9d6707664640653b47533b9.tar.gz
qcow: allow sub-cluster compressed write to last cluster
Compression in qcow requires image length to be a multiple of the cluster size. Lift this requirement by zero-padding the final cluster when necessary. The virtual disk size is still not cluster-aligned, so the guest cannot access the zero sectors. Note that this is almost identical to the qcow2 version of this code. qcow2's compression code is drawn from qcow. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
0 files changed, 0 insertions, 0 deletions