]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-cluster.c
block/qcow2: Simplify shared L2 handling in amend
authorMax Reitz <mreitz@redhat.com>
Mon, 27 Oct 2014 10:12:55 +0000 (11:12 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 3 Nov 2014 11:41:49 +0000 (11:41 +0000)
commitecf58777c5ff242f656dd3836475a5ded9c2eaa5
treec3556e6b3cb1d22d8bf46d8ef1419b406774c27e
parent44751917db7466739af358fdb60ae5fb84ed89df
block/qcow2: Simplify shared L2 handling in amend

Currently, we have a bitmap for keeping track of which clusters have
been created during the zero cluster expansion process. This was
necessary because we need to properly increase the refcount for shared
L2 tables.

However, now we can simply take the L2 refcount and use it for the
cluster allocated for expansion. This will be the correct refcount and
therefore we don't have to remember that cluster having been allocated
any more.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: BenoƮt Canet <benoit.canet@nodalink.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Message-id: 1414404776-4919-7-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2-cluster.c