All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, eblake@redhat.com, mreitz@redhat.com,
	quintela@redhat.com, dgilbert@redhat.com, stefanha@redhat.com,
	qemu-devel@nongnu.org, lvivier@redhat.com
Subject: [Qemu-devel] [PATCH v2 1/3] migration: Call blk_resume_after_migration() for postcopy
Date: Wed, 19 Apr 2017 17:16:00 +0200	[thread overview]
Message-ID: <1492614962-20946-2-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1492614962-20946-1-git-send-email-kwolf@redhat.com>

Commit d35ff5e6 ('block: Ignore guest dev permissions during incoming
migration') added blk_resume_after_migration() to the precopy migration
path, but neglected to add it to the duplicated code that is used for
postcopy migration. This means that the guest device doesn't request the
necessary permissions, which ultimately led to failing assertions.

Add the missing blk_resume_after_migration() to the postcopy path.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 migration/savevm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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

  reply	other threads:[~2017-04-19 15:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 15:15 [Qemu-devel] [PATCH v2 0/3] migration: Call blk_resume_after_migration() for postcopy Kevin Wolf
2017-04-19 15:16 ` Kevin Wolf [this message]
2017-04-19 15:16 ` [Qemu-devel] [PATCH v2 2/3] qemu-iotests: Filter HMP readline escape characters Kevin Wolf
2017-04-19 15:31   ` Eric Blake
2017-04-19 15:16 ` [Qemu-devel] [PATCH v2 3/3] qemu-iotests: Test postcopy migration Kevin Wolf
2017-04-20 14:18   ` Fam Zheng
2017-04-20 14:39     ` Daniel P. Berrange
2017-05-03 13:33 ` [Qemu-devel] [PATCH v2 0/3] migration: Call blk_resume_after_migration() for postcopy Stefan Hajnoczi

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=1492614962-20946-2-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.