[libvirt PATCH 15/30] qemu_snapshot: rework snapshot children deletion
Peter Krempa
pkrempa at redhat.com
Tue Dec 13 13:42:44 UTC 2022
On Thu, Dec 08, 2022 at 14:30:51 +0100, Pavel Hrdina wrote:
> This simplifies the code a bit by reusing existing parts that deletes
> a single snapshot.
>
> The drawback of this change is that we will now call the re-parent bits
> to keep the metadata in sync for every child even though it will get
> deleted as well.
>
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> src/qemu/qemu_snapshot.c | 69 +++++++++++++++++++++-------------------
> 1 file changed, 36 insertions(+), 33 deletions(-)
>
> diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
> index 3d5467457b..846f6e9e53 100644
> --- a/src/qemu/qemu_snapshot.c
> +++ b/src/qemu/qemu_snapshot.c
> @@ -2311,6 +2311,31 @@ qemuSnapshotDeleteSingle(virDomainObj *vm,
> }
>
>
> +struct qemuSnapshotDeleteAllData {
> + virDomainObj *vm;
> + bool metadata_only;
> + int error;
> +};
> +
> +
> +static int
> +qemuSnapshotDeleteAll(void *payload,
Since this itself doesn't delete all snapshots please call it e.g:
qemuSnapshotDeleteAllHelper
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
More information about the libvir-list
mailing list