Skip to contentSkip to conversation

migration: savevm: fix error code with migration blockers

PATCH In review Cole Robinson 3 participants 4 messages Apr 9, 2019 – May 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 migration: savevm: fix error code with migration blockers

The only caller that checks the error code is looking for != 0, so returning false is incorrect.

Fixes 5aaac467938 "migration: savevm: consult migration blockers"
---
 migration/savevm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/savevm.c +1 -1
index 34bcad3807..a3dae4cf02 100644
@@ -2544,7 +2544,7 @@ int save_snapshot(const char *name, Error **errp)
     AioContext *aio_context;
 
     if (migration_is_blocked(errp)) {
-        return false;
+        return ret;
     }
 
     if (!replay_can_snapshot()) {
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · * Cole Robinson ([email protected]) wrote:

The only caller that checks the error code is looking for != 0, so returning false is incorrect.

Fixes 5aaac467938 "migration: savevm: consult migration blockers"

Thanks, this was in 3.1.0 so isn't a 4.0 regression, so it'll have to wait for 4.1.

Quoted 20 lines
---
 migration/savevm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/savevm.c +1 -1
index 34bcad3807..a3dae4cf02 100644
@@ -2544,7 +2544,7 @@ int save_snapshot(const char *name, Error **errp)
     AioContext *aio_context;
 
     if (migration_is_blocked(errp)) {
-        return false;
+        return ret;
     }
 
     if (!replay_can_snapshot()) {
Signature · 1 line
2.21.0

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#3 lore raw
In reply to Cole Robinson
Quoted 6 lines · * Cole Robinson ([email protected]) wrote:

The only caller that checks the error code is looking for != 0, so returning false is incorrect.

Fixes 5aaac467938 "migration: savevm: consult migration blockers"

Queued

Quoted 21 lines
---
 migration/savevm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/savevm.c +1 -1
index 34bcad3807..a3dae4cf02 100644
@@ -2544,7 +2544,7 @@ int save_snapshot(const char *name, Error **errp)
     AioContext *aio_context;
 
     if (migration_is_blocked(errp)) {
-        return false;
+        return ret;
     }
 
     if (!replay_can_snapshot()) {
Signature · 1 line
2.21.0

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK