Migration pull 2017-08-02

Just minor fixes for 2.10
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZgdnJAAoJEAUWMx68W/3nw+MQAKphjisLyMqvfWY35Oe3jX0I
 cmLN2odU8ruX43dNij/0cUk1ETCAkNMBXgN2Y0uX9Ab8PEE9Z+YvumtVA9VUYRwF
 ljM5Md4I/5zLuW3e0X4btQtM/AV6vyEttt543lCHiFTZHlBltoJ6WoZZE2gg4Gz6
 tZjJIFtk4u8ojGoVO5dgb9O4EKwBSn0pvkr2UcA5AhWSA6WdOj96AKMqLBJaiJng
 r6xihQZMXgndalds3qFhHk8LQTSh8Nc8iL8DgurRgl7fd8Gc9nur9h27YRzQaP+y
 PvRJVMT+zuIBD1Ph/ZdGTUQbRpnVNUARNHSWKOSynWuPPEUQWxdcqoKorMpIVhkD
 C3pw/iVIGBpasNQc23TZSAUr2nG49c+ThJIvMqXcHGfDz7VguOaVTvX6dDbiHnvr
 uSeQisyeM+dCmDK1rLuewxkiTPaO003kMIdoDvzol4xItcQI0rdrzetwLQ3acN1A
 jP54WOOynx18Gj3mBnZcarydumOtcJ4Bh7zxgSzuKnD3L+0KjJWJOy3SZLGzuJTL
 DeETNIzGU525qWsEta0HowhDRhkape1Ie4f4Di6UuWrRboEeG/8+69EBAGbWJBwo
 WBY8dHPoY2eaYXSa08macx5jUTfh3zNZjshxx9xUCB4FHVT9ooaYGXG22mnjhM5O
 arWAqj6sa2zIDe1jEsG8
 =IAK0
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20170802a' into staging

Migration pull 2017-08-02

Just minor fixes for 2.10

# gpg: Signature made Wed 02 Aug 2017 14:55:21 BST
# gpg:                using RSA key 0x0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-migration-20170802a:
  io: fix qio_channel_socket_accept err handling
  migration: fix comment disorder in RAMState
  migration: fix small leaks

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2017-08-02 15:13:23 +01:00
commit b21c2751b6
3 changed files with 14 additions and 3 deletions

View File

@ -340,10 +340,11 @@ qio_channel_socket_accept(QIOChannelSocket *ioc,
cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr,
&cioc->remoteAddrLen);
if (cioc->fd < 0) {
trace_qio_channel_socket_accept_fail(ioc);
if (errno == EINTR) {
goto retry;
}
error_setg_errno(errp, errno, "Unable to accept connection");
trace_qio_channel_socket_accept_fail(ioc);
goto error;
}

View File

@ -2214,6 +2214,15 @@ static void migration_class_init(ObjectClass *klass, void *data)
dc->props = migration_properties;
}
static void migration_instance_finalize(Object *obj)
{
MigrationState *ms = MIGRATION_OBJ(obj);
MigrationParameters *params = &ms->parameters;
g_free(params->tls_hostname);
g_free(params->tls_creds);
}
static void migration_instance_init(Object *obj)
{
MigrationState *ms = MIGRATION_OBJ(obj);
@ -2282,6 +2291,7 @@ static const TypeInfo migration_type = {
.class_size = sizeof(MigrationClass),
.instance_size = sizeof(MigrationState),
.instance_init = migration_instance_init,
.instance_finalize = migration_instance_finalize,
};
static void register_migration_types(void)

View File

@ -188,9 +188,9 @@ struct RAMState {
uint64_t iterations_prev;
/* Iterations since start */
uint64_t iterations;
/* protects modification of the bitmap */
uint64_t migration_dirty_pages;
/* number of dirty bits in the bitmap */
uint64_t migration_dirty_pages;
/* protects modification of the bitmap */
QemuMutex bitmap_mutex;
/* The RAMBlock used in the last src_page_requests */
RAMBlock *last_req_rb;