Skip to contentSkip to conversation

migration: fixes

GIT PULL Applied Amit Shah 2 participants 6 messages Aug 11, 2016

lore
Share & tools
lore

Amit Shah

author
#0 lore raw

The following changes since commit d08306dc42ea599ffcf8aad056fa9c23acfbe230:

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2016-08-10 17:14:35 +0100)

are available in the git repository at:

http://git.kernel.org/pub/scm/virt/qemu/amit/migration.git tags/migration-for-2.7-7

for you to fetch changes up to 474c624ddf0d390b850526a01026ef8737e67ca7:

migration/socket: fix typo in file header (2016-08-11 17:03:51 +0530)

----------------------------------------------------------------
Migration:
- couple of bug fixes
- couple of typo fixes

----------------------------------------------------------------

Cao jin (2):
migration/ram: fix typo
migration/socket: fix typo in file header

Evgeny Yakovlev (1):
migration: mmap error check fix

Liang Li (1):
migration: fix live migration failure with compression

 migration/postcopy-ram.c | 3 ++-
 migration/qemu-file.c    | 1 +
 migration/ram.c          | 4 ++--
 migration/socket.c       | 4 +++-
 4 files changed, 8 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

[Qemu-devel] [PULL 2.7 1/4] migration/ram: fix typo

From: Cao jin <[email protected]>

Message-Id: <[email protected]>

---
 migration/ram.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
migration/ram.c +2 -2
index 815bc0e..a3d70c4 100644
@@ -375,8 +375,8 @@ void migrate_compress_threads_create(void)
     qemu_cond_init(&comp_done_cond);
     qemu_mutex_init(&comp_done_lock);
     for (i = 0; i < thread_count; i++) {
-        /* com_param[i].file is just used as a dummy buffer to save data, set
-         * it's ops to empty.
+        /* comp_param[i].file is just used as a dummy buffer to save data,
+         * set its ops to empty.
          */
         comp_param[i].file = qemu_fopen_ops(NULL, &empty_ops);
         comp_param[i].done = true;
Signature · 1 line
2.7.4
author
#2 lore raw

[Qemu-devel] [PULL 2.7 2/4] migration: mmap error check fix

In reply to Amit Shah

From: Evgeny Yakovlev <[email protected]>

mmap man page:
"On success, mmap() returns a pointer to the mapped area. On error, the value MAP_FAILED (that is, (void *) -1) is returned, and errno is set to indicate the cause of the error."

The check in postcopy_get_tmp_page is definitely wrong and should be fixed.

Message-Id: <[email protected]>

---
 migration/postcopy-ram.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
migration/postcopy-ram.c +2 -1
index abe8c60..9b04778 100644
@@ -604,7 +604,8 @@ void *postcopy_get_tmp_page(MigrationIncomingState *mis)
         mis->postcopy_tmp_page = mmap(NULL, getpagesize(),
                              PROT_READ | PROT_WRITE, MAP_PRIVATE |
                              MAP_ANONYMOUS, -1, 0);
-        if (!mis->postcopy_tmp_page) {
+        if (mis->postcopy_tmp_page == MAP_FAILED) {
+            mis->postcopy_tmp_page = NULL;
             error_report("%s: %s", __func__, strerror(errno));
             return NULL;
         }
Signature · 1 line
2.7.4
author
#3 lore raw

[Qemu-devel] [PULL 2.7 4/4] migration/socket: fix typo in file header

In reply to Amit Shah

From: Cao jin <[email protected]>

Code of inet socket & unix socket is merged together. Also add some newlines, make code block well separated.

Cc Daniel P. Berrange <[email protected]>
Cc Juan Quintela <[email protected]>
Cc Amit Shah <[email protected]>

Message-Id: <[email protected]>

---
 migration/socket.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
migration/socket.c +3 -1
index 5c0a38f..00de1fe 100644
@@ -1,5 +1,5 @@
 /*
- * QEMU live migration via Unix Domain Sockets
+ * QEMU live migration via socket
  *
  * Copyright Red Hat, Inc. 2009-2016
  *
@@ -94,10 +94,12 @@ static void socket_start_outgoing_migration(MigrationState *s,
 {
     QIOChannelSocket *sioc = qio_channel_socket_new();
     struct SocketConnectData *data = g_new0(struct SocketConnectData, 1);
+
     data->s = s;
     if (saddr->type == SOCKET_ADDRESS_KIND_INET) {
         data->hostname = g_strdup(saddr->u.inet.data->host);
     }
+
     qio_channel_socket_connect_async(sioc,
                                      saddr,
                                      socket_outgoing_migration,
Signature · 1 line
2.7.4
author
#4 lore raw

[Qemu-devel] [PULL 2.7 3/4] migration: fix live migration failure with compression

In reply to Amit Shah

From: Liang Li <[email protected]>

Because of commit 11808bb0c422, which remove some condition checks of 'f->ops->writev_buffer', 'qemu_put_qemu_file' should be enhanced to clear the 'f_src->iovcnt', or 'f_src->iovcnt' may exceed the MAX_IOV_SIZE which will break live migration. This should be fixed.

Message-Id: <[email protected]>

---
 migration/qemu-file.c | 1 +
 1 file changed, 1 insertion(+)
migration/qemu-file.c +1 -0
index bbc565e..e9fae31 100644
@@ -668,6 +668,7 @@ int qemu_put_qemu_file(QEMUFile *f_des, QEMUFile *f_src)
         len = f_src->buf_index;
         qemu_put_buffer(f_des, f_src->buf, f_src->buf_index);
         f_src->buf_index = 0;
+        f_src->iovcnt = 0;
     }
     return len;
 }
Signature · 1 line
2.7.4
#5 lore raw
In reply to Amit Shah
Quoted 10 lines · Amit Shah

The following changes since commit d08306dc42ea599ffcf8aad056fa9c23acfbe230:

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2016-08-10 17:14:35 +0100)

are available in the git repository at:

http://git.kernel.org/pub/scm/virt/qemu/amit/migration.git tags/migration-for-2.7-7

for you to fetch changes up to 474c624ddf0d390b850526a01026ef8737e67ca7:

Quoted 8 lines

migration/socket: fix typo in file header (2016-08-11 17:03:51 +0530)

----------------------------------------------------------------
Migration:
- couple of bug fixes
- couple of typo fixes

----------------------------------------------------------------

Applied, thanks.

-- PMM