diff options
author | Alberto Garcia <berto@igalia.com> | 2020-07-10 18:12:44 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-08-25 08:33:20 +0200 |
commit | 388e581615d11126bc6d37223d50cbf8e127bde1 (patch) | |
tree | 154f606f9c42fc6f71f0d182c861b232ea48bb82 /version.texi.in | |
parent | 9c4269d54b8bcc1939641009a2ea9b24d887fd58 (diff) | |
download | qemu-388e581615d11126bc6d37223d50cbf8e127bde1.zip qemu-388e581615d11126bc6d37223d50cbf8e127bde1.tar.gz qemu-388e581615d11126bc6d37223d50cbf8e127bde1.tar.bz2 |
qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()
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 directly. The function is also renamed accordingly.
There is a pre-existing exception with compressed clusters: in this
case the function returns the complete cluster descriptor (containing
the offset and size of the compressed data). This does not change with
this patch but it is now documented.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <ffae6cdc5ca8950e8280ac0f696dcc376cb07095.1594396418.git.berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'version.texi.in')
0 files changed, 0 insertions, 0 deletions