[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 10/16] qcow2: Fix broken snapshot table entri
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v2 10/16] qcow2: Fix broken snapshot table entries |
Date: |
Tue, 20 Aug 2019 13:46:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
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 <address@hidden>
>> ---
>> 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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 05/16] qcow2: Make qcow2_write_snapshots() public, (continued)
- [Qemu-devel] [PATCH v2 05/16] qcow2: Make qcow2_write_snapshots() public, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 06/16] qcow2: Put qcow2_upgrade() into its own function, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 07/16] qcow2: Write v3-compliant snapshot list on upgrade, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 08/16] qcow2: Separate qcow2_check_read_snapshot_table(), Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 09/16] qcow2: Add qcow2_check_fix_snapshot_table(), Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 11/16] qcow2: Keep track of the snapshot table length, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 10/16] qcow2: Fix broken snapshot table entries, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 12/16] qcow2: Fix overly long snapshot tables, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 13/16] qcow2: Repair snapshot table with too many entries, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 14/16] qcow2: Fix v3 snapshot table entry compliancy, Max Reitz, 2019/08/19
- [Qemu-devel] [PATCH v2 15/16] iotests: Add peek_file* functions, Max Reitz, 2019/08/19