Message ID | 20170412131831.GE4955@noname.str.redhat.com |
---|---|
State | New |
Headers | show |
On 12/04/2017 15:18, Kevin Wolf wrote: > Am 11.04.2017 um 17:07 hat Laurent Vivier geschrieben: >> On 11/04/2017 16:58, Kevin Wolf wrote: >>> Am 11.04.2017 um 16:50 hat Max Reitz geschrieben: >>>> In case of block migration, there may be writes to BlockBackends that do >>>> not have the write permission taken. Before this issue is fixed (which >>>> is not going to happen in 2.9), we therefore cannot assert that this is >>>> the case. >>>> >>>> Suggested-by: Kevin Wolf <kwolf@redhat.com> >>>> Signed-off-by: Max Reitz <mreitz@redhat.com> >>> >>> I tested block migration (migrate -b). Leaving postcopy migration, which >>> is apparently also broken, to Laurent. >>> >>> Reviewed-by: Kevin Wolf <kwolf@redhat.com> >>> Tested-by: Kevin Wolf <kwolf@redhat.com> >> >> With postcopy migration >> >> Tested-by: Laurent Vivier <lvivier@redhat.com> > > I think the following is the real fix for postcopy migration, in case > someone wants to give it a test before I send it as a proper patch (the > bug is a result of duplicating code between precopy/postcopy migration > instead of sharing it - commit d35ff5e6 only updated one of both). Tested with my test case and it works fine. Thanks, Laurent
diff --git a/migration/savevm.c b/migration/savevm.c index 3b19a4a..43fa9bf 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1623,6 +1623,14 @@ static void loadvm_postcopy_handle_run_bh(void *opaque) error_report_err(local_err); } + /* If we get an error here, just don't restart the VM yet. */ + blk_resume_after_migration(&local_err); + if (local_err) { + error_free(local_err); + local_err = NULL; + autostart = false; + } + trace_loadvm_postcopy_handle_run_cpu_sync(); cpu_synchronize_all_post_init();