diff options
| author | Max Reitz <mreitz@redhat.com> | 2019-10-11 17:28:10 +0200 |
|---|---|---|
| committer | Max Reitz <mreitz@redhat.com> | 2019-10-28 11:54:04 +0100 |
| commit | 099febf3ac37e8d615e90066e515dd9b1d9bba52 (patch) | |
| tree | 95f9d3045565458a3d76c629b66accbee2c38e2d /qemu-io-cmds.c | |
| parent | 624143355cb6e4149ec27b9b00088aeb958da31d (diff) | |
| download | focaccia-qemu-099febf3ac37e8d615e90066e515dd9b1d9bba52.tar.gz focaccia-qemu-099febf3ac37e8d615e90066e515dd9b1d9bba52.zip | |
qcow2: Fix overly long snapshot tables
We currently refuse to open qcow2 images with overly long snapshot tables. This patch makes qemu-img check -r all drop all offending entries past what we deem acceptable. The user cannot choose which snapshots are removed. This is fine because we have chosen the maximum snapshot table size to be so large (64 MB) 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-13-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qemu-io-cmds.c')
0 files changed, 0 insertions, 0 deletions