]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-cluster.c
qcow2: Split do_perform_cow() into _read(), _encrypt() and _write()
authorAlberto Garcia <berto@igalia.com>
Mon, 19 Jun 2017 13:40:05 +0000 (16:40 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 26 Jun 2017 12:51:13 +0000 (14:51 +0200)
commit672f0f2c4b5ee521f5ea06eadaacf8dfa99474f4
tree90d984cf97757dcce6a92a4d08e13260437dc93c
parent99450c6fb9ac85e2c8097156fed78b8ef1d610e0
qcow2: Split do_perform_cow() into _read(), _encrypt() and _write()

This patch splits do_perform_cow() into three separate functions to
read, encrypt and write the COW regions.

perform_cow() can now read both regions first, then encrypt them and
finally write them to disk. The memory allocation is also done in
this function now, using one single buffer large enough to hold both
regions.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c