qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v3 05/27] qcow2: Document the Extended L2 Entries feature


From: Alberto Garcia
Subject: Re: [RFC PATCH v3 05/27] qcow2: Document the Extended L2 Entries feature
Date: Thu, 20 Feb 2020 17:10:13 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Thu 20 Feb 2020 03:33:57 PM CET, Eric Blake wrote:
>>   Given an offset into the virtual disk, the offset into the image file can 
>> be
>>   obtained as follows:
>>   
>> -    l2_entries = (cluster_size / sizeof(uint64_t))
>> +    l2_entries = (cluster_size / sizeof(uint64_t))        [*]
>>   
>>       l2_index = (offset / cluster_size) % l2_entries
>>       l1_index = (offset / cluster_size) / l2_entries
>> @@ -447,6 +455,8 @@ obtained as follows:
>>   
>>       return cluster_offset + (offset % cluster_size)
>>   
>> +    [*] this changes if Extended L2 Entries are enabled, see next section
>
>> +The size of an extended L2 entry is 128 bits so the number of entries per 
>> table
>> +is calculated using this formula:
>> +
>> +    l2_entries = (cluster_size / (2 * sizeof(uint64_t)))
>
> Is it worth unifying these statements by writing:
>
> l2_entries = (cluster_size / ((1 + extended_l2) * sizeof(uint64_t)))
>
> or is that too confusing?

I think it's too confusing...

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]