On 8/19/19 1:55 PM, Max Reitz wrote: > The only case where we currently reject snapshot table entries is when > they have too much extra data. Fix them with qemu-img check -r all by > counting it as a corruption, reducing their extra_data_size, and then > letting qcow2_check_fix_snapshot_table() do the rest. > > Signed-off-by: Max Reitz <[email protected]> > --- > block/qcow2-snapshot.c | 67 +++++++++++++++++++++++++++++++++++------- > 1 file changed, 56 insertions(+), 11 deletions(-) >
> @@ -64,6 +80,8 @@ int qcow2_read_snapshots(BlockDriverState *bs, Error **errp)
> s->snapshots = g_new0(QCowSnapshot, s->nb_snapshots);
>
> for(i = 0; i < s->nb_snapshots; i++) {
> + bool truncate_unknown_extra_data = false;
Worth adding space after 'for' while in the vicinity?
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
