Migration:

- couple of bug fixes
  - couple of typo fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXrGMgAAoJEOsLTfxlfvZwcHsP/R8WMwaAHZKaZVRrKTp0vAj4
 LxSlbmDDVwK8q+gc8ARbUfmFXIWWYhGACXNu+BOuWsq0FwtbskJiCBV/hBF0OmoE
 YjMN5zpiARSbK8E+1oJ1jAA69QqttpNkq/IhpqYlrj7ehDwf384knwg9tJXmg5L0
 VYgxnBoJW8IveuEPZV4fkiohlSIFJ3G1XAYDcHbhlBtyc+TakLalRd28J6bYTZJP
 x+H55JviXXK00cEDPmi1SUQV6s2wTIruOrkds/y9eTPxKHlDw76GeDERwNczpx+7
 AgnZBwdVm4VB05PgaQNF2kBBNCjapVnh23f0wQkWe7575f6oMjQ9CWb0D/dxQDMK
 VqF7j41VWKHV8Y+UI++Zt0ojb/E2OUXi30PxVa0zHjI0ZWAaJPHXavpdQHpqaHlW
 hB4ZsZsdPsFgodyjN5Xtb3Lxcvffg6IL4DvQLvYPbYXniwS/cOo/Vtmb7N4EyxFV
 YKijA0naNweIGK1vyygJllrqWCCxen2cyDuMyunUi7aOHn3nTyvBuGMsxj1+tNuy
 +h78FMI447n7p32h5FsO0yIZ0gECIioGSDSyZ7Q3vlFrLiyrsyZVyyzveqkPQvo7
 310Ubt3J179FrUCVyt/YxpdE/t4XcbzHS9r7W1+t0uk7UC9C8gld9eQnzfkIUdYW
 92gH9xho3CYyrckV9HvH
 =eS0k
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.7-7' into staging

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

# gpg: Signature made Thu 11 Aug 2016 12:36:00 BST
# gpg:                using RSA key 0xEB0B4DFC657EF670
# gpg: Good signature from "Amit Shah <amit@amitshah.net>"
# gpg:                 aka "Amit Shah <amit@kernel.org>"
# gpg:                 aka "Amit Shah <amitshah@gmx.net>"
# Primary key fingerprint: 48CA 3722 5FE7 F4A8 B337  2735 1E9A 3B5F 8540 83B6
#      Subkey fingerprint: CC63 D332 AB8F 4617 4529  6534 EB0B 4DFC 657E F670

* remotes/amit-migration/tags/migration-for-2.7-7:
  migration/socket: fix typo in file header
  migration: fix live migration failure with compression
  migration: mmap error check fix
  migration/ram: fix typo

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
master
Peter Maydell 2016-08-11 17:53:35 +01:00
commit 28b874429b
4 changed files with 8 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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,