diff options
author | Alberto Garcia <berto@igalia.com> | 2018-02-05 16:33:15 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2018-02-13 16:59:59 +0100 |
commit | e2b5713eb9a8545e00eaeb5350069ef40c6cc49a (patch) | |
tree | a54b556b5db9c20d427dca518ccd10d8ac4a9c57 /block/vhdx.h | |
parent | 8f8181757771f252106efe2d6e833aabf0b64d01 (diff) | |
download | qemu-e2b5713eb9a8545e00eaeb5350069ef40c6cc49a.zip qemu-e2b5713eb9a8545e00eaeb5350069ef40c6cc49a.tar.gz qemu-e2b5713eb9a8545e00eaeb5350069ef40c6cc49a.tar.bz2 |
qcow2: Update l2_load() to support L2 slices
Each entry in the qcow2 L2 cache stores a full L2 table (which uses a
complete cluster in the qcow2 image). A cluster is usually too large
to be used efficiently as the size for a cache entry, so we want to
decouple both values by allowing smaller cache entries. Therefore the
qcow2 L2 cache will no longer return full L2 tables but slices
instead.
This patch updates l2_load() so it can handle L2 slices correctly.
Apart from the offset of the L2 table (which we already had) we also
need the guest offset in order to calculate which one of the slices
we need.
An L2 slice has currently the same size as an L2 table (one cluster),
so for now this function will load exactly the same data as before.
This patch also removes a stale comment about the return value being
a pointer to the L2 table. This function returns an error code since
55c17e9821c474d5fcdebdc82ed2fc096777d611.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: b830aa1fc5b6f8e3cb331d006853fe22facca847.1517840877.git.berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/vhdx.h')
0 files changed, 0 insertions, 0 deletions