« Previous | Next » 

Revision 0b919fae

ID0b919fae31f4f80f78ebeab8388dc3a03cc5e4ed

Added by Kevin Wolf almost 11 years ago

qcow2: Batch discards

This optimises the discard operation for freed clusters by batching
discard requests (both snapshot deletion and bdrv_discard end up
updating the refcounts cluster by cluster).

Note that we don't discard asynchronously, but keep s->lock held. This
is to avoid that a freed cluster is reallocated and written to while the
discard is still in flight.

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

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences