]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-refcount.c
block/qcow2: Add qcow2_refcount_area()
authorMax Reitz <mreitz@redhat.com>
Tue, 13 Jun 2017 20:21:03 +0000 (22:21 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 11 Jul 2017 15:45:02 +0000 (17:45 +0200)
commit12cc30a8cbdbb4c9c90cbffb970dfa679a1e3212
treec11d287f068c09839334b15e1a0ab1934d35f3a6
parent95b98f343b054e100a905181cd140c653c80cbad
block/qcow2: Add qcow2_refcount_area()

This function creates a collection of self-describing refcount
structures (including a new refcount table) at the end of a qcow2 image
file. Optionally, these structures can also describe a number of
additional clusters beyond themselves; this will be important for
preallocated truncation, which will place the data clusters and L2
tables there.

For now, we can use this function to replace the part of
alloc_refcount_block() that grows the refcount table (from which it is
actually derived).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170613202107.10125-13-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-refcount.c
block/qcow2.c
block/qcow2.h
tests/qemu-iotests/044.out