[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 02/34] qcow2: Convert qcow2_get_cluster_offset() into qcow
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v9 02/34] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset() |
Date: |
Tue, 30 Jun 2020 12:27:42 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Tue 30 Jun 2020 12:19:42 PM CEST, Max Reitz wrote:
>> @@ -537,8 +542,6 @@ int qcow2_get_cluster_offset(BlockDriverState *bs,
>> uint64_t offset,
>> bytes_needed = bytes_available;
>> }
>>
>> - *cluster_offset = 0;
>> -
>
> You drop this line without replacement now. That means that
> *host_offset is no longer set to 0 if the L1 entry is out of bounds or
> empty (which causes this function to return QCOW2_CLUSTER_UNALLOCATED
> and no error). Was that intentional?
Hmm, no, it wasn't intentional.
It does not have any side effect but I should be explicitly set
it to 0. I'll fix it in the next version.
Berto
- [PATCH v9 00/34] Add subcluster allocation to qcow2, Alberto Garcia, 2020/06/28
- [PATCH v9 26/34] qcow2: Clear the L2 bitmap when allocating a compressed cluster, Alberto Garcia, 2020/06/28
- [PATCH v9 03/34] qcow2: Add calculate_l2_meta(), Alberto Garcia, 2020/06/28
- [PATCH v9 04/34] qcow2: Split cluster_needs_cow() out of count_cow_clusters(), Alberto Garcia, 2020/06/28
- [PATCH v9 06/34] qcow2: Add get_l2_entry() and set_l2_entry(), Alberto Garcia, 2020/06/28
- [PATCH v9 10/34] qcow2: Add offset_to_sc_index(), Alberto Garcia, 2020/06/28
- [PATCH v9 08/34] qcow2: Add dummy has_subclusters() function, Alberto Garcia, 2020/06/28
- [PATCH v9 05/34] qcow2: Process QCOW2_CLUSTER_ZERO_ALLOC clusters in handle_copied(), Alberto Garcia, 2020/06/28
- [PATCH v9 02/34] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset(), Alberto Garcia, 2020/06/28
- [PATCH v9 07/34] qcow2: Document the Extended L2 Entries feature, Alberto Garcia, 2020/06/28
- [PATCH v9 13/34] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap(), Alberto Garcia, 2020/06/28
- [PATCH v9 24/34] qcow2: Add subcluster support to check_refcounts_l2(), Alberto Garcia, 2020/06/28
- [PATCH v9 29/34] qcow2: Add subcluster support to qcow2_measure(), Alberto Garcia, 2020/06/28
- [PATCH v9 22/34] qcow2: Add subcluster support to zero_in_l2_slice(), Alberto Garcia, 2020/06/28
- [PATCH v9 19/34] qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC, Alberto Garcia, 2020/06/28
- [PATCH v9 09/34] qcow2: Add subcluster-related fields to BDRVQcow2State, Alberto Garcia, 2020/06/28
- [PATCH v9 11/34] qcow2: Add offset_into_subcluster() and size_to_subclusters(), Alberto Garcia, 2020/06/28
- [PATCH v9 16/34] qcow2: Add qcow2_cluster_is_allocated(), Alberto Garcia, 2020/06/28
- [PATCH v9 30/34] qcow2: Add prealloc field to QCowL2Meta, Alberto Garcia, 2020/06/28