qcow2: Add calculate_l2_meta()
commit8f91d6906c2217b968b6b01cdcb9e0edbb4d18ab
authorAlberto Garcia <berto@igalia.com>
Fri, 10 Jul 2020 16:12:45 +0000 (10 18:12 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 25 Aug 2020 06:33:20 +0000 (25 08:33 +0200)
treedbbc8694d61d3ea9c7f0bd21f19c0debe781a540
parent388e581615d11126bc6d37223d50cbf8e127bde1
qcow2: Add calculate_l2_meta()

handle_alloc() creates a QCowL2Meta structure in order to update the
image metadata and perform the necessary copy-on-write operations.

This patch moves that code to a separate function so it can be used
from other places.

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