qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Fam Zheng <famz@redhat.com>,
	dgilbert@redhat.com, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.9?] block/io: Comment out permission assertions
Date: Wed, 12 Apr 2017 15:18:31 +0200	[thread overview]
Message-ID: <20170412131831.GE4955@noname.str.redhat.com> (raw)
In-Reply-To: <ec159701-4d77-7dfa-2909-b544391cf513@redhat.com>

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

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	other threads:[~2017-04-12 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 14:50 [Qemu-devel] [PATCH for-2.9?] block/io: Comment out permission assertions Max Reitz
2017-04-11 14:52 ` Max Reitz
2017-04-11 14:58 ` Kevin Wolf
2017-04-11 15:07   ` Laurent Vivier
2017-04-12 13:18     ` Kevin Wolf [this message]
2017-04-12 13:28       ` Laurent Vivier
2017-04-11 15:47 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170412131831.GE4955@noname.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=famz@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).