diff mbox

[7/7] do not allow migration if block copy in progress

Message ID 20110523213411.080716110@amt.cnet
State New
Headers show

Commit Message

Marcelo Tosatti May 23, 2011, 9:31 p.m. UTC
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Comments

Avi Kivity May 29, 2011, 8:54 a.m. UTC | #1
On 05/24/2011 12:31 AM, Marcelo Tosatti wrote:
> Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>
> Index: qemu-block-copy/migration.c
> ===================================================================
> --- qemu-block-copy.orig/migration.c
> +++ qemu-block-copy/migration.c
> @@ -19,6 +19,7 @@
>   #include "block.h"
>   #include "qemu_socket.h"
>   #include "block-migration.h"
> +#include "block-copy.h"
>   #include "qemu-objects.h"
>
>   //#define DEBUG_MIGRATION
> @@ -95,6 +96,11 @@ int do_migrate(Monitor *mon, const QDict
>           return -1;
>       }
>
> +    if (block_copy_active()) {
> +        monitor_printf(mon, "block copy in progress\n");
> +        return -1;
> +    }
> +

Changelog should state why the conflict exists.
diff mbox

Patch

Index: qemu-block-copy/migration.c
===================================================================
--- qemu-block-copy.orig/migration.c
+++ qemu-block-copy/migration.c
@@ -19,6 +19,7 @@ 
 #include "block.h"
 #include "qemu_socket.h"
 #include "block-migration.h"
+#include "block-copy.h"
 #include "qemu-objects.h"
 
 //#define DEBUG_MIGRATION
@@ -95,6 +96,11 @@  int do_migrate(Monitor *mon, const QDict
         return -1;
     }
 
+    if (block_copy_active()) {
+        monitor_printf(mon, "block copy in progress\n");
+        return -1;
+    }
+
     if (strstart(uri, "tcp:", &p)) {
         s = tcp_start_outgoing_migration(mon, p, max_throttle, detach,
                                          blk, inc);