]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-snapshot.c
qcow2: Repair snapshot table with too many entries
authorMax Reitz <mreitz@redhat.com>
Fri, 11 Oct 2019 15:28:11 +0000 (17:28 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 28 Oct 2019 10:54:08 +0000 (11:54 +0100)
commitd2b1d1ec734a847ba5d4fba4341a851ec1741d0a
tree214696246d0673b550ee249ca3e8a8b581e9692e
parent099febf3ac37e8d615e90066e515dd9b1d9bba52
qcow2: Repair snapshot table with too many entries

The user cannot choose which snapshots are removed.  This is fine
because we have chosen the maximum snapshot table size to be so large
(65536 entries) that it cannot be reasonably reached.  If the snapshot
table exceeds this size, the image has probably been corrupted in some
way; in this case, it is most important to just make the image usable
such that the user can copy off at least the active layer.
(Also note that the snapshots will be removed only with "-r all", so a
plain "check" or "check -r leaks" will not delete any data.)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20191011152814.14791-14-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-snapshot.c