qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 04/16] qcow2: Keep unknown extra snapshot data


From: Max Reitz
Subject: Re: [PATCH v3 04/16] qcow2: Keep unknown extra snapshot data
Date: Mon, 14 Oct 2019 10:46:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 11.10.19 18:20, Eric Blake wrote:
> On 10/11/19 10:28 AM, Max Reitz wrote:
>> The qcow2 specification says to ignore unknown extra data fields in
>> snapshot table entries.  Currently, we discard it whenever we update the
>> image, which is a bit different from "ignore".
>>
>> This patch makes the qcow2 driver keep all unknown extra data fields
>> when updating an image's snapshot table.
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> Reviewed-by: Eric Blake <address@hidden>
>> ---
> 
>>   /* Bitmap header extension constraints */
>>   #define QCOW2_MAX_BITMAPS 65535
>>   #define QCOW2_MAX_BITMAP_DIRECTORY_SIZE (1024 * QCOW2_MAX_BITMAPS)
>> @@ -181,6 +184,8 @@ typedef struct QCowSnapshot {
>>       uint32_t date_sec;
>>       uint32_t date_nsec;
>>       uint64_t vm_clock_nsec;
>> +    uint32_t extra_data_size;
>> +    void *unknown_extra_data; /* Extra data past
>> QCowSnapshotExtraData */
> 
> Would it be worth a comment change:
> 
> uint32_t extra_data_size; /* Size of all extra data, including
> QCowSnapshotExtraData */
> void *unknown_extra_data; /* Data beyond QCowSnapshotExtraData, if any */
> 
> Either way, R-b stands.

Can’t hurt.  Well, except that extra_data_size may or may not include
QCowSnapshotExtraData, because maybe it isn’t fully present in the image.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]