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

2020-09-15 Thread Max Reitz
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

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

2020-09-14 Thread Alberto Garcia
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

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

2020-09-14 Thread Max Reitz
On 11.09.20 16:09, Alberto Garcia wrote: > qcow2_alloc_cluster_offset() takes an (unaligned) guest offset and > returns the (aligned) offset of the corresponding cluster in the qcow2 > image. > > In practice none of the callers need to know where the cluster starts > so this patch makes the

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

2020-09-11 Thread Alberto Garcia
qcow2_alloc_cluster_offset() takes an (unaligned) guest offset and returns the (aligned) offset of the corresponding cluster in the qcow2 image. In practice none of the callers need to know where the cluster starts so this patch makes the function calculate and return the final host offset