qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_a


From: Max Reitz
Subject: Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()
Date: Tue, 15 Sep 2020 09:21:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 14.09.20 18:42, Alberto Garcia wrote:
> On Mon 14 Sep 2020 02:14:36 PM CEST, Max Reitz wrote:
> 
>> However, I wonder what you think about “cluster_offset” in
>> qcow2_alloc_host_offset.  It isn’t a cluster offset anymore.
>> Can/should we rename it?
> 
> That variable was not a cluster offset before this patch either (at
> least not during the first iteration of the loop).

Hm, yes.  Doesn’t make it less wrong, but you’re right, there is no
argument why this should be addressed in this patch (or series).

> The difference is that *host_offset is always the offset of the
> beginning of the requested region, and cluster_offset increases with
> every iteration of the loop. Maybe current_offset / current_host_offset?
> I don't know, but I'm fine with changing it if you have a good name.

current_host_offset sounds nice.  But let’s just leave it how it is for now.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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