« Previous | Next » 

Revision 16b3c5cd

ID16b3c5cd9f27678bc9d6707664640653b47533b9

Added by Stefan Hajnoczi almost 11 years ago

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 <>
Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences