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: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
Showing
想要评论请 注册 或 登录