[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 20/39] qcow2: Update qcow2_get_cluster_offset
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v3 20/39] qcow2: Update qcow2_get_cluster_offset() to support L2 slices |
Date: |
Wed, 31 Jan 2018 21:24:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 2018-01-26 15:59, Alberto Garcia wrote:
> qcow2_get_cluster_offset() checks how many contiguous bytes are
> available at a given offset. The returned number of bytes is limited
> by the amount that can be addressed without having to load more than
> one L2 table.
>
> Since we'll be loading L2 slices instead of full tables this patch
> changes the limit accordingly using the size of the L2 slice for the
> calculations instead of the full table size.
>
> One consequence of this is that with small L2 slices operations such
> as 'qemu-img map' will need to iterate in more steps because each
> qcow2_get_cluster_offset() call will potentially return a smaller
> number. However the code is already prepared for that so this doesn't
> break semantics.
>
> The l2_table variable is also renamed to l2_slice to reflect this, and
> offset_to_l2_index() is replaced with offset_to_l2_slice_index().
>
> Signed-off-by: Alberto Garcia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> block/qcow2-cluster.c | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v3 27/39] qcow2: Update qcow2_update_snapshot_refcount() to support L2 slices, (continued)
- [Qemu-devel] [PATCH v3 04/39] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 34/39] qcow2: Rename l2_table in count_contiguous_clusters_unallocated(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 01/39] qcow2: Fix documentation of get_cluster_table(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 17/39] qcow2: Update l2_allocate() to support L2 slices, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 20/39] qcow2: Update qcow2_get_cluster_offset() to support L2 slices, Alberto Garcia, 2018/01/26
- Re: [Qemu-devel] [PATCH v3 20/39] qcow2: Update qcow2_get_cluster_offset() to support L2 slices,
Max Reitz <=
- [Qemu-devel] [PATCH v3 32/39] qcow2: Rename l2_table in qcow2_alloc_compressed_cluster_offset(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 06/39] qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 38/39] iotests: Test downgrading an image using a small L2 slice size, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 35/39] qcow2: Rename l2_table in count_cow_clusters(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 28/39] qcow2: Read refcount before L2 table in expand_zero_clusters_in_l1(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 31/39] qcow2: Update qcow2_truncate() to support L2 slices, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 10/39] qcow2: Remove BDS parameter from qcow2_cache_discard(), Alberto Garcia, 2018/01/26