On 19.08.19 21:37, Eric Blake wrote:
> 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 <mre...@redhat.com>
>> ---
>>  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?

Hm, it doesn’t bother me enough, at least.  It’d probably be better to
just fix all occurrences of that in block/qcow2* in one patch (and there
are a few indeed).  That is, if someone is sufficiently bothered by it. ;-)

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to