Re: [PATCH v3 07/16] qcow2: Write v3-compliant snapshot list on upgrade

2019-10-14 Thread Max Reitz
On 14.10.19 15:53, Eric Blake wrote: > On 10/14/19 3:45 AM, Max Reitz wrote: > +    need_snapshot_update = false; +    for (i = 0; i < s->nb_snapshots; i++) { +    if (s->snapshots[i].extra_data_size < +    sizeof_field(QCowSnapshotExtraData, vm_state_size_large) +

Re: [PATCH v3 07/16] qcow2: Write v3-compliant snapshot list on upgrade

2019-10-14 Thread Eric Blake
On 10/14/19 3:45 AM, Max Reitz wrote: +    need_snapshot_update = false; +    for (i = 0; i < s->nb_snapshots; i++) { +    if (s->snapshots[i].extra_data_size < +    sizeof_field(QCowSnapshotExtraData, vm_state_size_large) + +    sizeof_field(QCowSnapshotExtraData,

Re: [PATCH v3 07/16] qcow2: Write v3-compliant snapshot list on upgrade

2019-10-14 Thread Max Reitz
On 11.10.19 18:23, Eric Blake wrote: > On 10/11/19 10:28 AM, Max Reitz wrote: >> qcow2 v3 requires every snapshot table entry to have two extra data >> fields: The 64-bit VM state size, and the virtual disk size.  Both are >> optional for v2 images, so they may not be present. >> >>

Re: [PATCH v3 07/16] qcow2: Write v3-compliant snapshot list on upgrade

2019-10-11 Thread Eric Blake
On 10/11/19 10:28 AM, Max Reitz wrote: qcow2 v3 requires every snapshot table entry to have two extra data fields: The 64-bit VM state size, and the virtual disk size. Both are optional for v2 images, so they may not be present. qcow2_upgrade() therefore should update the snapshot table to