On Tue, Jan 30, 2024 at 13:15:50 +0100, Pavel Hrdina wrote: > The condition was completely wrong. As per the comment for function > virDomainMomentIsAncestor() it checks that the first argument is > descendant of the second argument. > > Consider the following snapshot tree for VM: > > s1 > | > +- s2 > | | > | +- s3 > | > +- s4 > | > +- s5 (current) > > When deleting s2 with the original code we checked if > virDomainMomentIsAncestor(s2, s5) which would return false basically for > any snapshot as s5 is leaf snapshot so no children. > > When deleting s2 with fixed code we check if > virDomainMomentIsAncestor(s5, s2) which still returns false but when > deleting s4 it will correctly return true. > > Resolves: https://issues.redhat.com/browse/RHEL-23212 > Signed-off-by: Pavel Hrdina <[email protected]> > --- > src/qemu/qemu_snapshot.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Please add the currently-wrong error message into the commit message. Reviewed-by: Peter Krempa <[email protected]> _______________________________________________ Devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
