mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
qcow2: Document the Extended L2 Entries feature
Subcluster allocation in qcow2 is implemented by extending the existing L2 table entries and adding additional information to indicate the allocation status of each subcluster. This patch documents the changes to the qcow2 format and how they affect the calculation of the L2 cache size. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <5199f2e1c717bcaa58b48142c9062b803145ff7f.1594396418.git.berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
12c6aebedf
commit
30afc12085
2 changed files with 83 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
qcow2 L2/refcount cache configuration
|
||||
=====================================
|
||||
Copyright (C) 2015, 2018 Igalia, S.L.
|
||||
Copyright (C) 2015, 2018-2020 Igalia, S.L.
|
||||
Author: Alberto Garcia <berto@igalia.com>
|
||||
|
||||
This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
|
@ -222,3 +222,20 @@ support this functionality, and is 0 (disabled) on other platforms.
|
|||
This functionality currently relies on the MADV_DONTNEED argument for
|
||||
madvise() to actually free the memory. This is a Linux-specific feature,
|
||||
so cache-clean-interval is not supported on other systems.
|
||||
|
||||
|
||||
Extended L2 Entries
|
||||
-------------------
|
||||
All numbers shown in this document are valid for qcow2 images with normal
|
||||
64-bit L2 entries.
|
||||
|
||||
Images with extended L2 entries need twice as much L2 metadata, so the L2
|
||||
cache size must be twice as large for the same disk space.
|
||||
|
||||
disk_size = l2_cache_size * cluster_size / 16
|
||||
|
||||
i.e.
|
||||
|
||||
l2_cache_size = disk_size * 16 / cluster_size
|
||||
|
||||
Refcount blocks are not affected by this.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue