« Previous | Next » 

Revision 710c2496

ID710c2496d8cecc92568d439a3cf9d5874b3a55e2

Added by Kevin Wolf about 11 years ago

qcow2: Use byte granularity in qcow2_alloc_cluster_offset()

This gets rid of the nb_clusters and keep_clusters and the associated
complicated calculations. Just advance the number of bytes that have
been processed and everything is fine.

This patch advances the variables even after the last operation even
though they aren't used any more afterwards to make things look more
uniform. A later patch will turn the whole thing into a loop and then
it actually starts making sense.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences