aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-07-23 06:15:02 +0200
committerJuan Quintela <quintela@redhat.com>2012-12-20 23:09:25 +0100
commitdd217b8732b93d97c22fa70dc15a72d92a2b2380 (patch)
tree11a8aed85b6e5bb87e45b1196c8fcf2923bca7e8 /migration.c
parent766bd1769e70835e0cc25f3f057f101619494b59 (diff)
downloadqemu-dd217b8732b93d97c22fa70dc15a72d92a2b2380.zip
qemu-dd217b8732b93d97c22fa70dc15a72d92a2b2380.tar.gz
qemu-dd217b8732b93d97c22fa70dc15a72d92a2b2380.tar.bz2
migration: make writes blocking
Move all the writes to the migration_thread, and make writings blocking. Notice that are still using the iothread for everything that we do. Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/migration.c b/migration.c
index 249eea3..207c754 100644
--- a/migration.c
+++ b/migration.c
@@ -297,18 +297,6 @@ static void migrate_fd_completed(MigrationState *s)
notifier_list_notify(&migration_state_notifiers, s);
}
-static void migrate_fd_put_notify(void *opaque)
-{
- MigrationState *s = opaque;
- int ret;
-
- qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
- ret = qemu_file_put_notify(s->file);
- if (ret) {
- migrate_fd_error(s);
- }
-}
-
ssize_t migrate_fd_put_buffer(MigrationState *s, const void *data,
size_t size)
{
@@ -325,10 +313,6 @@ ssize_t migrate_fd_put_buffer(MigrationState *s, const void *data,
if (ret == -1)
ret = -(s->get_error(s));
- if (ret == -EAGAIN) {
- qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s);
- }
-
return ret;
}
@@ -425,7 +409,6 @@ int migrate_fd_close(MigrationState *s)
{
int rc = 0;
if (s->fd != -1) {
- qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
rc = s->close(s);
s->fd = -1;
}