« Previous | Next » 

Revision 16fde5f2

ID16fde5f2c2788232b16c06d34d0459a5c1ec1f6c

Added by Kevin Wolf about 13 years ago

qcow2: Fix order in L2 table COW

When copying L2 tables (this happens only with internal snapshots), the order
wasn't completely safe, so that after a crash you could end up with a L2 table
that has too low refcount, possibly leading to corruption in the long run.

This patch puts the operations in the right order: First allocate the new
L2 table and replace the reference, and only then decrease the refcount of the
old table.

Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences