]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
qcow2: add shrink image support
authorPavel Butsykin <pbutsykin@virtuozzo.com>
Mon, 18 Sep 2017 12:42:29 +0000 (15:42 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 26 Sep 2017 13:00:32 +0000 (15:00 +0200)
commit46b732cdf3737ea8f9654f6ccd67ff52ddeddc20
tree2bacf7bfdcf21d73c098822a236960fb7dd03825
parentf71c08ea8e60f035485a512fd2af8908567592f0
qcow2: add shrink image support

This patch add shrinking of the image file for qcow2. As a result, this allows
us to reduce the virtual image size and free up space on the disk without
copying the image. Image can be fragmented and shrink is done by punching holes
in the image file.

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20170918124230.8152-4-pbutsykin@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2.c
block/qcow2.h
qapi/block-core.json