qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH for-2.9?] block/io: Comment out permission asser


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH for-2.9?] block/io: Comment out permission assertions
Date: Wed, 12 Apr 2017 15:18:31 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> >> Signed-off-by: Max Reitz <address@hidden>
> > 
> > I tested block migration (migrate -b). Leaving postcopy migration, which
> > is apparently also broken, to Laurent.
> > 
> > Reviewed-by: Kevin Wolf <address@hidden>
> > Tested-by: Kevin Wolf <address@hidden>
> 
> With postcopy migration
> 
> Tested-by: Laurent Vivier <address@hidden>

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).

Kevin


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();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]