On 10/22/2014 06:51 AM, Max Reitz wrote: > bdrv_make_empty() is currently only called if the current image > represents an external snapshot that has been committed to its base > image; it is therefore unlikely to have internal snapshots. In this > case, bdrv_make_empty() can be greatly sped up by emptying the L1 and > refcount table (while having the dirty flag set, which only works for > compat=1.1) and creating a trivial refcount structure. > > If there are snapshots or for compat=0.10, fall back to the simple > implementation (discard all clusters). > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block/blkdebug.c | 2 + > block/qcow2.c | 143 > ++++++++++++++++++++++++++++++++++++++++++++------ > include/block/block.h | 2 + > 3 files changed, 132 insertions(+), 15 deletions(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature