propagate error on failed completion
PATCH 3/3 propagate error on failed completion
migrate_fd_put_ready() calls qemu_savevm_state_complete(), but the later can fail.
If it happens, re-start the vm and propagate the error up
Based on a patch by Yaniv Kamay
--- migration.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
migration.c +5 -1
@@ -224,7 +224,11 @@ void migrate_fd_put_ready(void *opaque)vm_stop (0 );bdrv_flush_all (); -qemu_savevm_state_complete (s->file); +if ((qemu_savevm_state_complete (s->file)) <0 ) { +vm_start (); + s->state =MIG_STATE_ERROR ; +return ; + } s->state =MIG_STATE_COMPLETED ;migrate_fd_cleanup (s); }
Signature · 1 line
1.5.6.6
Quoted 22 lines · Glauber Costa
migrate_fd_put_ready()callsqemu_savevm_state_complete(), but the later can fail.If it happens, re-start the vm and propagate the error up
Based on a patch by Yaniv Kamay
Signed-off-by Glauber Costa <[email protected]>CC Yaniv Kamay <[email protected]>CC Dor Laor <[email protected]>--- migration.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)migration.c +0
-0@@ -224,7 +224,11 @@ void migrate_fd_put_ready(void *opaque)vm_stop (0 );
migration.c void migrate_fd_put_ready(void *opaque) · line 234
Quoted 10 lines
migration.c +5
-1bdrv_flush_all (); -qemu_savevm_state_complete (s->file); +if ((qemu_savevm_state_complete (s->file)) <0 ) { +vm_start (); + s->state =MIG_STATE_ERROR ; +return ; + } s->state =MIG_STATE_COMPLETED ;migrate_fd_cleanup (s); }
We need to call migrate_fd_cleanup() in case of error.
Yaniv
Quoted 25 lines · Yaniv Kamay
Quoted 24 lines · Glauber Costa
migrate_fd_put_ready()callsqemu_savevm_state_complete(), but the later can fail.If it happens, re-start the vm and propagate the error up
Based on a patch by Yaniv Kamay
Signed-off-by Glauber Costa <[email protected]>CC Yaniv Kamay <[email protected]>CC Dor Laor <[email protected]>--- migration.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)migration.c +2
-1@@ -224,7 +224,11 @@ void migrate_fd_put_ready(void *opaque)vm_stop (0 );bdrv_flush_all (); -qemu_savevm_state_complete (s->file); +if ((qemu_savevm_state_complete (s->file)) <0 ) { +vm_start ();
Quoted 8 lines
migration.c void migrate_fd_put_ready(void *opaque)
Quoted 7 lines
migration.c +3
-0+ s->state =MIG_STATE_ERROR ; +return ; + } s->state =MIG_STATE_COMPLETED ;migrate_fd_cleanup (s); }We need to call
migrate_fd_cleanup()in case of error.
thanks for the spot. I will update this patch.
Quoted 3 lines
Yaniv