migration: cleanup migration (including thread) in the iothread

Perform final cleanup in a bottom half, and add joining the thread to
the series of cleanup actions.

migrate_fd_error remains for connection error, but it doesn't need
to cleanup anything anymore.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Paolo Bonzini 2013-02-22 17:36:21 +01:00 committed by Juan Quintela
parent f4410a5d99
commit bb1fadc444
2 changed files with 21 additions and 18 deletions

View file

@ -38,6 +38,7 @@ struct MigrationState
size_t buffer_size;
size_t buffer_capacity;
QemuThread thread;
QEMUBH *cleanup_bh;
QEMUFile *file;
int fd;