« Previous | Next » 

Revision 86fa8da8

ID86fa8da83771238de55dc44819a1a27bafef5353

Added by Kevin Wolf almost 14 years ago

qcow2: Fix corruption after error in update_refcount

After it is done with updating refcounts in the cache, update_refcount writes
all changed entries to disk. If a refcount block allocation fails, however,
there was no change yet and therefore first_index = last_index = -1. Don't
treat -1 as a normal sector index (resulting in a 512 byte write!) but return
without updating anything in this case.

Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences