]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: checkpoint: Introduce helper to find checkpoint disk definition in parents
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Jan 2020 08:55:18 +0000 (09:55 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Jan 2020 14:28:49 +0000 (15:28 +0100)
commit6796194a28bd42bcbb237ffae6faea262fcce660
treef4ffd3ae11920fc358241aad4944e7c3dc475520
parent180b3422e9a3391a0ee59d0076730ba85778fc7a
qemu: checkpoint: Introduce helper to find checkpoint disk definition in parents

The algorithm is used in two places to find the parent checkpoint object
which contains given disk and then uses data from the disk. Additionally
the code is written in a very non-obvious way. Factor out the lookup of
the disk into a function which also simplifies the callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_checkpoint.c