]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDomainSnapshotAlignDisks: Allow alternate domain definition when redefining
authorPeter Krempa <pkrempa@redhat.com>
Wed, 12 Jan 2022 13:20:04 +0000 (14:20 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 14 Jan 2022 17:05:30 +0000 (18:05 +0100)
commitef3f3884a2432958bdd4ea0ce45509d47a91a453
tree59965c31ed69f92ed88dcfcf710a12646af5d363
parent0b97d87a6da02656cf584b716e3183a217213977
virDomainSnapshotAlignDisks: Allow alternate domain definition when redefining

Due to historical reasons we allow users to redefine an existing
snapshot without providing the domain definition which would correspond
to it. In such case we'd use the domain definition from the snapshot
that is being redefined.

To prevent callers from doing complex moving of the domain definition
object back and forth between the snapshot definitions we can add an
argument to virDomainSnapshotAlignDisks which will allow us to pass in
the alternate definition if the one from the snapshot is missing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/snapshot_conf.c
src/conf/snapshot_conf.h
src/qemu/qemu_snapshot.c
src/test/test_driver.c