Skip to content
  • Kevin Wolf's avatar
    qcow2: Batch discards · 0b919fae
    Kevin Wolf authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    0b919fae