[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 04/16] qcow2: Keep unknown extra snapshot data
From: |
Eric Blake |
Subject: |
Re: [PATCH v3 04/16] qcow2: Keep unknown extra snapshot data |
Date: |
Fri, 11 Oct 2019 11:20:50 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
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.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- [PATCH v3 00/16] qcow2: Let check -r all repair some snapshot bits, Max Reitz, 2019/10/11
- [PATCH v3 01/16] include: Move endof() up from hw/virtio/virtio.h, Max Reitz, 2019/10/11
- [PATCH v3 02/16] qcow2: Use endof(), Max Reitz, 2019/10/11
- [PATCH v3 03/16] qcow2: Add Error ** to qcow2_read_snapshots(), Max Reitz, 2019/10/11
- [PATCH v3 04/16] qcow2: Keep unknown extra snapshot data, Max Reitz, 2019/10/11
- Re: [PATCH v3 04/16] qcow2: Keep unknown extra snapshot data,
Eric Blake <=
- [PATCH v3 05/16] qcow2: Make qcow2_write_snapshots() public, Max Reitz, 2019/10/11
- [PATCH v3 06/16] qcow2: Put qcow2_upgrade() into its own function, Max Reitz, 2019/10/11
- [PATCH v3 07/16] qcow2: Write v3-compliant snapshot list on upgrade, Max Reitz, 2019/10/11
[PATCH v3 08/16] qcow2: Separate qcow2_check_read_snapshot_table(), Max Reitz, 2019/10/11
[PATCH v3 09/16] qcow2: Add qcow2_check_fix_snapshot_table(), Max Reitz, 2019/10/11