[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/7] migration: migrate-continue
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH 4/7] migration: migrate-continue |
Date: |
Wed, 11 Oct 2017 20:13:14 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
A new qmp command allows the caller to continue from a given
paused state.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration/migration.c | 11 +++++++++++
qapi/migration.json | 17 +++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index b411a7bb63..be03e8ff0b 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1368,6 +1368,17 @@ void qmp_migrate_cancel(Error **errp)
migrate_fd_cancel(migrate_get_current());
}
+void qmp_migrate_continue(MigrationStatus state, Error **errp)
+{
+ MigrationState *s = migrate_get_current();
+ if (s->state != state) {
+ error_setg(errp, "Migration not in expected state: %s",
+ MigrationStatus_str(s->state));
+ return;
+ }
+ qemu_sem_post(&s->pause_sem);
+}
+
void qmp_migrate_set_cache_size(int64_t value, Error **errp)
{
MigrationState *s = migrate_get_current();
diff --git a/qapi/migration.json b/qapi/migration.json
index 00f2f6cc09..a95eb19528 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -877,6 +877,23 @@
{ 'command': 'migrate_cancel' }
##
+# @migrate-continue:
+#
+# Continue migration when it's in a paused state.
+#
+# @state: The state the migration is currently expected to be in
+#
+# Returns: nothing on success
+# Since: 2.11
+# Example:
+#
+# -> { "execute": "migrate-continue" , "arguments":
+# { "state": "pause-before-device" } }
+# <- { "return": {} }
+##
+{ 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
+
+##
# @migrate_set_downtime:
#
# Set maximum tolerated downtime for migration.
--
2.13.6
- [Qemu-devel] [PATCH 0/7] migration: pause-before-device, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 1/7] migration: Add 'pause-before-device' capability, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 2/7] migration: Add 'pause-before-device' and 'device' statuses, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 3/7] migration: Wait for semaphore before completing migration, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 4/7] migration: migrate-continue,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH 5/7] migrate: HMP migate_continue, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 6/7] migration: allow cancel to unpause, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 7/7] migration: pause-before-device for postcopy, Dr. David Alan Gilbert (git), 2017/10/11
- Re: [Qemu-devel] [PATCH 0/7] migration: pause-before-device, no-reply, 2017/10/11
- Re: [Qemu-devel] [PATCH 0/7] migration: pause-before-device, Daniel P. Berrange, 2017/10/12
Re: [Qemu-devel] [PATCH 0/7] migration: pause-before-device, Daniel P. Berrange, 2017/10/12