Re: [libvirt PATCH 15/30] qemu_snapshot: rework snapshot children deletion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux