[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: |
Alberto Garcia |
Subject: |
Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset() |
Date: |
Mon, 14 Sep 2020 18:42:48 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
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).
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.
Berto