]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-cache.c
qcow2: Add table size field to Qcow2Cache
authorAlberto Garcia <berto@igalia.com>
Mon, 5 Feb 2018 14:33:02 +0000 (16:33 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 13 Feb 2018 15:59:58 +0000 (16:59 +0100)
commit03019d73142f78c22b87b7162f3c4a390d7d839e
treeafd5ee7fec5ee6a589329959559009a2f32ad967
parentd4c373b854f813a6c3b9f763c98723053aa80ac5
qcow2: Add table size field to Qcow2Cache

The table size in the qcow2 cache is currently equal to the cluster
size. This doesn't allow us to use the cache memory efficiently,
particularly with large cluster sizes, so we need to be able to have
smaller cache tables that are independent from the cluster size. This
patch adds a new field to Qcow2Cache that we can use instead of the
cluster size.

The current table size is still being initialized to the cluster size,
so there are no semantic changes yet, but this patch will allow us to
prepare the rest of the code and simplify a few function calls.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 67a1bf9e55f417005c567bead95a018dc34bc687.1517840876.git.berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-cache.c