Re: [PATCH v9 02/34] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-06-30 Thread Alberto Garcia
On Tue 30 Jun 2020 12:19:42 PM CEST, Max Reitz wrote: >> @@ -537,8 +542,6 @@ int qcow2_get_cluster_offset(BlockDriverState *bs, >> uint64_t offset, >> bytes_needed = bytes_available; >> } >> >> -*cluster_offset = 0; >> - > > You drop this line without replacement now. That

Re: [PATCH v9 02/34] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-06-30 Thread Max Reitz
On 28.06.20 13:02, Alberto Garcia wrote: > qcow2_get_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 v9 02/34] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-06-28 Thread Alberto Garcia
qcow2_get_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