From: nikita.lapshin@openvz.org
To: qemu-devel@nongnu.org
Cc: den@virtuozzo.com, andrey.drobyshev@virtuozzo.com,
quintela@redhat.com, dgilbert@redhat.com,
nikita.lapshin@openvz.org
Subject: [PATCH 3/8] migration: Add vmstate part of migration stream
Date: Thu, 16 Jun 2022 13:19:59 +0300 [thread overview]
Message-ID: <20220616102006.218693-4-nikita.lapshin@openvz.org> (raw)
In-Reply-To: <20220616102006.218693-1-nikita.lapshin@openvz.org>
From: Nikita Lapshin <nikita.lapshin@openvz.org>
Now we can disable and enable vmstate part by stream_content parameter.
Signed-off-by: Nikita Lapshin <nikita.lapshin@openvz.org>
---
migration/migration.c | 10 ++++++++--
migration/savevm.c | 15 +++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 4adcc87d1d..bbf9b6aad1 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1334,9 +1334,15 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,
}
}
-static bool check_stream_parts(strList *stream_content_list)
+static bool check_stream_parts(strList *stream_list)
{
- /* To be implemented in ext commits */
+ for (; stream_list; stream_list = stream_list->next) {
+ if (!strcmp(stream_list->value, "vmstate")) {
+ continue;
+ }
+
+ return false;
+ }
return true;
}
diff --git a/migration/savevm.c b/migration/savevm.c
index c68f187ef7..48603517ba 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -949,6 +949,21 @@ static bool should_skip(SaveStateEntry *se)
return true;
}
+ /*
+ * Assume that any SaveStateEntry with non-null vmsd is
+ * part of vmstate.
+ *
+ *
+ * Vmstate is included by default so firstly check if
+ * stream-content-list is enabled.
+ */
+
+ if (se->vmsd &&
+ migrate_get_current()->parameters.has_stream_content_list &&
+ !migrate_find_stream_content("vmstate")) {
+ return true;
+ }
+
return false;
}
--
2.31.1
next prev parent reply other threads:[~2022-06-16 10:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 10:19 [PATCH 0/8] New parameter for migration stream nikita.lapshin
2022-06-16 10:19 ` [PATCH 1/8] migration: Implemented new parameter stream_content nikita.lapshin
2022-06-16 10:32 ` Daniel P. Berrangé
2022-06-16 12:53 ` Nikita
2022-06-16 13:10 ` Daniel P. Berrangé
2022-06-16 13:22 ` Nikita
2022-06-16 10:19 ` [PATCH 2/8] migration: should_skip() implemented nikita.lapshin
2022-06-16 10:19 ` nikita.lapshin [this message]
2022-06-16 10:20 ` [PATCH 4/8] igration: Add dirty-bitmaps part of migration stream nikita.lapshin
2022-06-16 10:20 ` [PATCH 4/8] migration: " nikita.lapshin
2022-06-16 10:20 ` [PATCH 5/8] Add block " nikita.lapshin
2022-06-16 10:22 ` Nikita
2022-06-16 10:20 ` [PATCH 5/8] migration: " nikita.lapshin
2022-06-16 10:20 ` [PATCH 6/8] migration: Add RAM " nikita.lapshin
2022-06-16 10:20 ` [PATCH 7/8] migration: analyze-migration script changed nikita.lapshin
2022-06-16 10:20 ` [PATCH 8/8] migration: Test for RAM and vmstate parts nikita.lapshin
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=20220616102006.218693-4-nikita.lapshin@openvz.org \
--to=nikita.lapshin@openvz.org \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=den@virtuozzo.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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).