[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 15/39] qcow2: Update l2_load() to support L2
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v3 15/39] qcow2: Update l2_load() to support L2 slices |
Date: |
Wed, 31 Jan 2018 20:56:11 +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:
> Each entry in the qcow2 L2 cache stores a full L2 table (which uses a
> complete cluster in the qcow2 image). A cluster is usually too large
> to be used efficiently as the size for a cache entry, so we want to
> decouple both values by allowing smaller cache entries. Therefore the
> qcow2 L2 cache will no longer return full L2 tables but slices
> instead.
>
> This patch updates l2_load() so it can handle L2 slices correctly.
> Apart from the offset of the L2 table (which we already had) we also
> need the guest offset in order to calculate which one of the slices
> we need.
>
> An L2 slice has currently the same size as an L2 table (one cluster),
> so for now this function will load exactly the same data as before.
>
> This patch also removes a stale comment about the return value being
> a pointer to the L2 table. This function returns an error code since
> 55c17e9821c474d5fcdebdc82ed2fc096777d611.
>
> Signed-off-by: Alberto Garcia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> block/qcow2-cluster.c | 28 +++++++++++++++++-----------
> 1 file changed, 17 insertions(+), 11 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 00/39] Allow configuring the qcow2 L2 cache entry size, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 16/39] qcow2: Prepare l2_allocate() for adding L2 slice support, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 02/39] qcow2: Add table size field to Qcow2Cache, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 18/39] qcow2: Refactor get_cluster_table(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 15/39] qcow2: Update l2_load() to support L2 slices, Alberto Garcia, 2018/01/26
- Re: [Qemu-devel] [PATCH v3 15/39] qcow2: Update l2_load() to support L2 slices,
Max Reitz <=
- [Qemu-devel] [PATCH v3 12/39] qcow2: Add offset_to_l1_index(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 03/39] qcow2: Remove BDS parameter from qcow2_cache_get_table_addr(), Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 19/39] qcow2: Update get_cluster_table() to support L2 slices, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 37/39] iotests: Test valid values of l2-cache-entry-size, Alberto Garcia, 2018/01/26
- [Qemu-devel] [PATCH v3 39/39] iotests: Add l2-cache-entry-size to iotest 137, Alberto Garcia, 2018/01/26