All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anthony Liguori <aliguori@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: [Qemu-devel] [patch 3/3] do not allow migration if block copy in progress
Date: Thu, 16 Dec 2010 15:44:22 -0200	[thread overview]
Message-ID: <20101216174810.740347376@redhat.com> (raw)
In-Reply-To: 20101216174419.090204390@redhat.com

[-- Attachment #1: blockcopy-active --]
[-- Type: text/plain, Size: 784 bytes --]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: qemu-kvm-block-copy/migration.c
===================================================================
--- qemu-kvm-block-copy.orig/migration.c
+++ qemu-kvm-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
@@ -88,6 +89,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);

  parent reply	other threads:[~2010-12-16 18:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 17:44 [Qemu-devel] [patch 0/3] add support for live block copy Marcelo Tosatti
2010-12-16 17:44 ` [Qemu-devel] [patch 1/3] add migration_active function Marcelo Tosatti
2010-12-16 17:44 ` [Qemu-devel] [patch 2/3] live block copy Marcelo Tosatti
2011-01-14 10:46   ` Stefan Hajnoczi
2011-01-14 12:20     ` Marcelo Tosatti
2010-12-16 17:44 ` Marcelo Tosatti [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-22 17:00 [Qemu-devel] [patch 0/3] live block copy (v2) Marcelo Tosatti
2011-02-22 17:00 ` [Qemu-devel] [patch 3/3] do not allow migration if block copy in progress Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101216174810.740347376@redhat.com \
    --to=mtosatti@redhat.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.