[libvirt RFC 19/24] qemu_snapshot: refactor validation of snapshot delete

Peter Krempa pkrempa at redhat.com
Thu Sep 1 14:25:50 UTC 2022


On Tue, Aug 23, 2022 at 18:32:22 +0200, Pavel Hrdina wrote:
> Prepare the validation function for external snapshot delete support.
> 
> There is one exception when deleting `children-only` snapshots. If the
> snapshot tree is like this example:
> 
>     snap1 (external)
>      |
>      +- snap2 (internal)
>          |
>          +- snap3 (internal)
>              |
>              +- snap4 (internal)
> 
> and user calls `snapshot-delete snap1 --children-only` the current
> snapshot is external but all the children snapshots are internal only
> and we are able to delete it.
> 
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
>  src/qemu/qemu_snapshot.c | 72 +++++++++++++++++++++++++---------------
>  1 file changed, 45 insertions(+), 27 deletions(-)

Reviewed-by: Peter Krempa <pkrempa at redhat.com>


More information about the libvir-list mailing list