[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 10/27] qcow2: Update get/set_l2_entry() and add get/se
From: |
Alberto Garcia |
Subject: |
Re: [RFC PATCH v3 10/27] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap() |
Date: |
Fri, 21 Feb 2020 14:57:40 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Thu 20 Feb 2020 05:27:28 PM CET, Max Reitz wrote:
>> +static inline uint64_t get_l2_bitmap(BDRVQcow2State *s, uint64_t *l2_slice,
>> + int idx)
>> +{
>> + if (has_subclusters(s)) {
>> + idx *= l2_entry_size(s) / sizeof(uint64_t);
>> + return be64_to_cpu(l2_slice[idx + 1]);
>> + } else {
>> + /* For convenience only; the caller should ignore this value. */
>> + return 0;
>
> Is there a reason you decided not to return the first subcluster as
> allocated? (As you had proposed in v2)
Yeah, I thought that it would not make much sense to return a meaningful
value after a comment saying that the caller should ignore it.
If there was a situation in which something depends on that value then
it would be a bug in QEMU.
Berto