[libvirt PATCH] qemu: fix inactive snapshot revert

Ján Tomko posted 1 patch 2 years, 3 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/c1a46ed7839b72247712552156a65145e13c0275.1642687155.git.jtomko@redhat.com
src/qemu/qemu_snapshot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] qemu: fix inactive snapshot revert
Posted by Ján Tomko 2 years, 3 months ago
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

Re: [libvirt PATCH] qemu: fix inactive snapshot revert
Posted by Peter Krempa 2 years, 3 months ago
On Thu, Jan 20, 2022 at 14:59:22 +0100, Ján Tomko wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=2039136

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>

Re: [libvirt PATCH] qemu: fix inactive snapshot revert
Posted by Ján Tomko 2 years, 3 months ago
On a Thursday in 2022, Peter Krempa wrote:
>On Thu, Jan 20, 2022 at 14:59:22 +0100, Ján Tomko wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=2039136
>
>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>
>
Re: [libvirt PATCH] qemu: fix inactive snapshot revert
Posted by Peter Krempa 2 years, 3 months ago
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:
> > > https://bugzilla.redhat.com/show_bug.cgi?id=2039136
> > 
> > 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!