[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3 12/39] qcow2: Add offset_to_l1_index()
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v3 12/39] qcow2: Add offset_to_l1_index() |
Date: |
Wed, 31 Jan 2018 20:43:04 +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:
> Similar to offset_to_l2_index(), this function returns the index in
> the L1 table for a given guest offset. This is only used in a couple
> of places and it's not a particularly complex calculation, but it
> makes the code a bit more readable.
>
> Although in the qcow2_get_cluster_offset() case the old code was
> taking advantage of the l1_bits variable, we're going to get rid of
> the other uses of l1_bits in a later patch anyway, so it doesn't make
> sense to keep it just for this.
>
> Signed-off-by: Alberto Garcia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> block/qcow2-cluster.c | 4 ++--
> block/qcow2.h | 5 +++++
> 2 files changed, 7 insertions(+), 2 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v3 02/39] qcow2: Add table size field to Qcow2Cache, (continued)
- [Qemu-block] [PATCH v3 02/39] qcow2: Add table size field to Qcow2Cache, Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 15/39] qcow2: Update l2_load() to support L2 slices, Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 18/39] qcow2: Refactor get_cluster_table(), Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 03/39] qcow2: Remove BDS parameter from qcow2_cache_get_table_addr(), Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 12/39] qcow2: Add offset_to_l1_index(), Alberto Garcia, 2018/01/26
- Re: [Qemu-block] [PATCH v3 12/39] qcow2: Add offset_to_l1_index(),
Max Reitz <=
- [Qemu-block] [PATCH v3 19/39] qcow2: Update get_cluster_table() to support L2 slices, Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 37/39] iotests: Test valid values of l2-cache-entry-size, Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 39/39] iotests: Add l2-cache-entry-size to iotest 137, Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 27/39] qcow2: Update qcow2_update_snapshot_refcount() to support L2 slices, Alberto Garcia, 2018/01/26
- [Qemu-block] [PATCH v3 04/39] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx(), Alberto Garcia, 2018/01/26