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 >> Reviewed-by: Eric Blake >> --- > >>   /* 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