[libvirt RFC 14/24] qemu_snapshot: introduce qemuSnapshotDiscardMetadata
Peter Krempa
pkrempa at redhat.com
Thu Sep 1 14:16:31 UTC 2022
On Tue, Aug 23, 2022 at 18:32:17 +0200, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> src/qemu/qemu_snapshot.c | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
> index 493d83d017..b94506c177 100644
> --- a/src/qemu/qemu_snapshot.c
> +++ b/src/qemu/qemu_snapshot.c
> @@ -2376,10 +2376,9 @@ qemuSnapshotDiscardAllMetadata(virQEMUDriver *driver,
>
>
> static int
> -qemuSnapshotDeleteSingle(virDomainObj *vm,
> - virDomainMomentObj *snap,
> - virQEMUDriver *driver,
> - bool metadata_only)
> +qemuSnapshotDiscardMetadata(virDomainObj *vm,
> + virDomainMomentObj *snap,
> + virQEMUDriver *driver)
This function is very misleading now.
Specifically it does _NOT_ delete the metadata of @snap but rather
modifies the metadata to update the parent appropriately. The metadata
of @snap is still deleted in qemuSnapshotDiscard.
The non-existant commit message and function header also doesn't help in
understanding what this is actually supposed to do.
More information about the libvir-list
mailing list