[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 14/32] qcow2: Add offset_to_l2_slice_index()
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 14/32] qcow2: Add offset_to_l2_slice_index() |
Date: |
Tue, 16 Jan 2018 16:10:37 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 12/15/2017 06:53 AM, Alberto Garcia wrote:
> Similar to offset_to_l2_index(), this function takes a guest offset
> and returns the index in the L2 slice that contains its L2 entry.
>
> An L2 slice has currently the same size as an L2 table (one cluster),
> so both functions return the same value for now.
>
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
> block/qcow2.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
Reviewed-by: Eric Blake <address@hidden>
> +
> static inline int64_t align_offset(int64_t offset, int n)
> {
> offset = (offset + n - 1) & ~(n - 1);
>
Unrelated to this commit, but should we switch this to use
QEMU_ALIGN_UP() instead of open-coding it?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 14/32] qcow2: Add offset_to_l2_slice_index(),
Eric Blake <=