]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-refcount.c
qcow2: Add l2_entry_size()
authorAlberto Garcia <berto@igalia.com>
Fri, 10 Jul 2020 16:12:54 +0000 (18:12 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 25 Aug 2020 06:33:20 +0000 (08:33 +0200)
commitc8fd8554d972904bd0b04673298fea1af7a37780
treecde7c8538b6ceb2d287310a2c7b4fb523ef56daa
parent3e71981592a9f9c52833887f5675b3154d23eec8
qcow2: Add l2_entry_size()

qcow2 images with subclusters have 128-bit L2 entries. The first 64
bits contain the same information as traditional images and the last
64 bits form a bitmap with the status of each individual subcluster.

Because of that we cannot assume that L2 entries are sizeof(uint64_t)
anymore. This function returns the proper value for the image.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <d34d578bd0380e739e2dde3e8dd6187d3d249fa9.1594396418.git.berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2.c
block/qcow2.h