On Wed 17 Jan 2018 05:57:32 PM CET, Anton Nefedov wrote:
> On 17/1/2018 6:42 PM, Alberto Garcia wrote:
>> On Tue 16 Jan 2018 05:52:36 PM CET, Anton Nefedov wrote:
>>>
>>> Cosmetic: maybe this l2_load() better be merged with the copied L2 case?
>>> e.g.
>>>
>>>     if (!(l1_table[l1_index] & COPIED))
>>>       l2_allocate();
>>>     l2_load();
>> 
>> I'm not sure about that, since there's also the qcow2_free_clusters()
>> call afterwards, so the final code might be harder to follow.
>
> actually shouldn't qcow2_free_clusters() be done before l2_load()?
> Otherwise we bail out on error and leak space.

Good catch, I think that you're right. I'll fix that.

Berto

Reply via email to