[libvirt PATCH] qemu: fix inactive snapshot revert

https://bugzilla.redhat.com/show_bug.cgi?id=2039136 Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 9cf185026c..1887c70708 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -2190,7 +2190,7 @@ qemuSnapshotRevertInactive(virDomainObj *vm, if (*inactiveConfig) { virDomainObjAssignDef(vm, inactiveConfig, false, NULL); - return -1; + defined = true; } if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | -- 2.31.1

On Thu, Jan 20, 2022 at 14:59:22 +0100, Ján Tomko wrote:
Determining what's being fixed is left as an excercise for the reader?
Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Consider explaining a bit what's going on in the commit message. Reviewed-by: Peter Krempa <pkrempa@redhat.com>

On a Thursday in 2022, Peter Krempa wrote:
On Thu, Jan 20, 2022 at 14:59:22 +0100, Ján Tomko wrote:
Determining what's being fixed is left as an excercise for the reader?
I have written this commit message before pushing: The commit splitting out the qemuSnapshotRevertInactive function dropped the 'defined = true' line by accident and instead returned -1, leaving the user with a cryptic error: error: An error occurred, but the cause is unknown Jano
Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Consider explaining a bit what's going on in the commit message.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>

On Thu, Jan 20, 2022 at 15:15:34 +0100, Ján Tomko wrote:
On a Thursday in 2022, Peter Krempa wrote:
On Thu, Jan 20, 2022 at 14:59:22 +0100, Ján Tomko wrote:
Determining what's being fixed is left as an excercise for the reader?
I have written this commit message before pushing:
The commit splitting out the qemuSnapshotRevertInactive function dropped the 'defined = true' line by accident and instead returned -1, leaving the user with a cryptic error: error: An error occurred, but the cause is unknown
Thanks!
participants (2)
-
Ján Tomko
-
Peter Krempa