migration: Recover block devices if failure in device state
PATCH 1/1 migration: Recover block devices if failure in device state
From: "Dr. David Alan Gilbert" <[email protected]>
In e91d895 I added the new pause-before-switchover mechanism to allow migration completion to be delayed; this changes the last state prior to completion to MIGRATE_STATUS_DEVICE rather than MIGRATE_STATUS_ACTIVE.
Fix the failure path in migration_completion to recover the block devices if it fails in MIGRATE_STATUS_DEVICE, not just the MIGRATE_STATUS_ACTIVE that it previously had.
This corresponds to rh bz:
https://bugzilla.redhat.com/show_bug.cgi?id=1538494
whose symptom is an occasional source crash on a failed migration.
--- migration/migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
migration/migration.c +2 -1
@@ -2122,7 +2122,8 @@ fail_invalidate:/* If not doing postcopy, vm_start() will be called: let's regain * control on images. */ -if (s->state ==MIGRATION_STATUS_ACTIVE ) { +if (s->state ==MIGRATION_STATUS_ACTIVE || + s->state ==MIGRATION_STATUS_DEVICE ) {Error *local_err =NULL ;qemu_mutex_lock_iothread ();
Signature · 1 line
2.14.3
Quoted 11 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
In e91d895 I added the new pause-before-switchover mechanism to allow migration completion to be delayed; this changes the last state prior to completion to
MIGRATE_STATUS_DEVICErather thanMIGRATE_STATUS_ACTIVE.Fix the failure path in
migration_completionto recover the block devices if it fails inMIGRATE_STATUS_DEVICE, not just theMIGRATE_STATUS_ACTIVEthat it previously had.
Quoted 6 lines
This corresponds to rh bz:
https://bugzilla.redhat.com/show_bug.cgi?id=1538494
whose symptom is an occasional source crash on a failed migration.Fixes e91d8951d59d483f085fSigned-off-by Dr. David Alan Gilbert <[email protected]>
Signature · 1 line
Peter Xu