aboutsummaryrefslogtreecommitdiff
path: root/migration.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2010-05-11 15:51:36 +0200
committerJuan Quintela <quintela@redhat.com>2011-10-20 13:23:53 +0200
commit3f77fc557e3e1cb8aab72ca0ca91aac67d478118 (patch)
tree3ad36995007cdef23b77c790b19135c915a8f54d /migration.h
parentdc7acc61b67a49ce56f6a7c93692f72a3fe0759f (diff)
migration: Fold MigrationState into FdMigrationState
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.h')
-rw-r--r--migration.h23
1 files changed, 5 insertions, 18 deletions
diff --git a/migration.h b/migration.h
index b10bb6e79d..f0caf7b26b 100644
--- a/migration.h
+++ b/migration.h
@@ -23,23 +23,10 @@
#define MIG_STATE_CANCELLED 1
#define MIG_STATE_ACTIVE 2
-typedef struct MigrationState MigrationState;
-
typedef struct FdMigrationState FdMigrationState;
-struct MigrationState
-{
- /* FIXME: add more accessors to print migration info */
- void (*cancel)(FdMigrationState *s);
- int (*get_status)(FdMigrationState *s);
- void (*release)(FdMigrationState *s);
- int blk;
- int shared;
-};
-
struct FdMigrationState
{
- MigrationState mig_state;
int64_t bandwidth_limit;
QEMUFile *file;
int fd;
@@ -48,7 +35,12 @@ struct FdMigrationState
int (*get_error)(struct FdMigrationState*);
int (*close)(struct FdMigrationState*);
int (*write)(struct FdMigrationState*, const void *, size_t);
+ void (*cancel)(FdMigrationState *s);
+ int (*get_status)(FdMigrationState *s);
+ void (*release)(FdMigrationState *s);
void *opaque;
+ int blk;
+ int shared;
};
void process_incoming_migration(QEMUFile *f);
@@ -130,11 +122,6 @@ void migrate_fd_wait_for_unfreeze(void *opaque);
int migrate_fd_close(void *opaque);
-static inline FdMigrationState *migrate_to_fms(MigrationState *mig_state)
-{
- return container_of(mig_state, FdMigrationState, mig_state);
-}
-
void add_migration_state_change_notifier(Notifier *notify);
void remove_migration_state_change_notifier(Notifier *notify);
int get_migration_state(void);