mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
migration: use QEMUFile for migration channel lifetime
As a start, use QEMUFile to store the destination and close it. qemu_get_fd gets a file descriptor that will be used by the write callbacks. 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:
parent
3f2d38faab
commit
f8bbc12863
7 changed files with 21 additions and 89 deletions
|
@ -38,12 +38,13 @@ struct MigrationState
|
|||
QEMUBH *cleanup_bh;
|
||||
|
||||
QEMUFile *file;
|
||||
QEMUFile *migration_file;
|
||||
|
||||
int fd;
|
||||
int state;
|
||||
int (*get_error)(MigrationState *s);
|
||||
int (*close)(MigrationState *s);
|
||||
int (*write)(MigrationState *s, const void *buff, size_t size);
|
||||
void *opaque;
|
||||
|
||||
int state;
|
||||
MigrationParams params;
|
||||
int64_t total_time;
|
||||
int64_t downtime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue