[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [patch 1/3] add migration_active function
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [patch 1/3] add migration_active function |
Date: |
Tue, 22 Feb 2011 14:00:05 -0300 |
User-agent: |
quilt/0.47-1 |
To query whether migration is active.
Signed-off-by: Marcelo Tosatti <address@hidden>
Index: qemu/migration.c
===================================================================
--- qemu.orig/migration.c
+++ qemu/migration.c
@@ -480,3 +480,13 @@ int get_migration_state(void)
return MIG_STATE_ERROR;
}
}
+
+bool migration_active(void)
+{
+ if (current_migration &&
+ current_migration->get_status(current_migration) == MIG_STATE_ACTIVE) {
+ return true;
+ }
+
+ return false;
+}
Index: qemu/migration.h
===================================================================
--- qemu.orig/migration.h
+++ qemu/migration.h
@@ -139,4 +139,6 @@ void add_migration_state_change_notifier
void remove_migration_state_change_notifier(Notifier *notify);
int get_migration_state(void);
+bool migration_active(void);
+
#endif
- Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy, (continued)
[Qemu-devel] [patch 3/3] do not allow migration if block copy in progress, Marcelo Tosatti, 2011/02/22
[Qemu-devel] [patch 1/3] add migration_active function,
Marcelo Tosatti <=