]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.h
qcow2: Add DEFAULT_L2_CACHE_CLUSTERS
authorMax Reitz <mreitz@redhat.com>
Mon, 1 Jun 2015 16:09:19 +0000 (18:09 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 12 Jun 2015 13:54:01 +0000 (15:54 +0200)
commitbc85ef265a0118d044ff62ae217c186cb08e0866
tree84c55bd7a6e154cc318869f214fa55c66fea4a9d
parenta4291eafc597c0944057930acf3e51d899f79c2e
qcow2: Add DEFAULT_L2_CACHE_CLUSTERS

If a relatively large cluster size is chosen, the default of 1 MB L2
cache is not really appropriate. In this case, unless overridden by the
user, the default cache size should not be determined by its size in
bytes but by the number of L2 tables (clusters) it is supposed to
contain.

Note that without this patch, MIN_L2_CACHE_SIZE will effectively take
over the same role. However, providing space for just two L2 tables is
not enough to be the default.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c
block/qcow2.h