From: Md Haris Iqbal <haris.phnx@gmail.com>
To: qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, Md Haris Iqbal <haris.phnx@gmail.com>
Subject: [Qemu-devel] [PATCH 5/6] Migration: Recovering pages lost due to n/w failure during pc migration (source)
Date: Mon, 22 Aug 2016 02:28:51 +0530 [thread overview]
Message-ID: <1471813132-13836-6-git-send-email-haris.phnx@gmail.com> (raw)
In-Reply-To: <1471813132-13836-1-git-send-email-haris.phnx@gmail.com>
Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com>
---
include/migration/migration.h | 5 +++++
migration/migration.c | 2 ++
migration/savevm.c | 5 +++++
3 files changed, 12 insertions(+)
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 4e4c0c8..5533832 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -145,6 +145,11 @@ struct MigrationState
int state;
/* Old style params from 'migrate' command */
MigrationParams params;
+ /*
+ * Don't need 2 variables for recovery.
+ * Clean this up, use a single variable with different states.
+ */
+ bool recovered_once;
bool in_recovery;
/* State related to return path */
diff --git a/migration/migration.c b/migration/migration.c
index 7cd3344..6faa483 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1042,6 +1042,7 @@ MigrationState *migrate_init(const MigrationParams *params)
s->xfer_limit = 0;
s->cleanup_bh = 0;
s->to_dst_file = NULL;
+ s->recovered_once = false;
s->in_recovery = false;
s->state = MIGRATION_STATUS_NONE;
s->params = *params;
@@ -1925,6 +1926,7 @@ static void *migration_thread(void *opaque)
if(ret == 0) {
current_active_state = MIGRATION_STATUS_POSTCOPY_ACTIVE;
runstate_set(RUN_STATE_FINISH_MIGRATE);
+ s->recovered_once = true;
qemu_file_clear_error(s->to_dst_file);
continue;
}
diff --git a/migration/savevm.c b/migration/savevm.c
index 79f601c..aa4f777 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -986,6 +986,11 @@ void qemu_savevm_state_complete_postcopy(QEMUFile *f)
{
SaveStateEntry *se;
int ret;
+ MigrationState *ms = migrate_get_current();
+
+ if (ms->recovered_once) {
+ qemu_savevm_command_send(f, MIG_CMD_POSTCOPY_RECOVERY, 0, NULL);
+ }
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
if (!se->ops || !se->ops->save_live_complete_postcopy) {
--
2.7.4
next prev parent reply other threads:[~2016-08-21 20:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 20:58 [Qemu-devel] [PATCH 0/6] Recovery from network failure during Postcopy Migration Md Haris Iqbal
2016-08-21 20:58 ` [Qemu-devel] [PATCH 1/6] Migration: Reconnect network in case of network failure during pc migration (source) Md Haris Iqbal
2016-08-21 20:58 ` [Qemu-devel] [PATCH 2/6] migration : General additions for migration recovery Md Haris Iqbal
2016-08-21 20:58 ` [Qemu-devel] [PATCH 3/6] Migration: Reconnect network in case of network failure during pc migration (destination) Md Haris Iqbal
2016-08-21 20:58 ` [Qemu-devel] [PATCH 4/6] Migration: New bitmap for postcopy migration failure Md Haris Iqbal
2016-08-21 20:58 ` Md Haris Iqbal [this message]
2016-08-21 20:58 ` [Qemu-devel] [PATCH 6/6] Migration: Recovering pages lost due to n/w failure during pc migration (destination) Md Haris Iqbal
2016-08-21 21:10 ` [Qemu-devel] [PATCH 0/6] Recovery from network failure during Postcopy Migration no-reply
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=1471813132-13836-6-git-send-email-haris.phnx@gmail.com \
--to=haris.phnx@gmail.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.