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 1/3] add migration_active function
Date: Thu, 16 Dec 2010 15:44:20 -0200 [thread overview]
Message-ID: <20101216174810.650542462@redhat.com> (raw)
In-Reply-To: 20101216174419.090204390@redhat.com
[-- Attachment #1: migration-active --]
[-- Type: text/plain, Size: 973 bytes --]
To query whether migration is active.
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
@@ -448,3 +448,13 @@ int migrate_fd_close(void *opaque)
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
return s->close(s);
}
+
+bool migration_active(void)
+{
+ if (current_migration &&
+ current_migration->get_status(current_migration) == MIG_STATE_ACTIVE) {
+ return true;
+ }
+
+ return false;
+}
Index: qemu-kvm-block-copy/migration.h
===================================================================
--- qemu-kvm-block-copy.orig/migration.h
+++ qemu-kvm-block-copy/migration.h
@@ -134,4 +134,6 @@ static inline FdMigrationState *migrate_
return container_of(mig_state, FdMigrationState, mig_state);
}
+bool migration_active(void);
+
#endif
next prev parent reply other threads:[~2010-12-16 18:07 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 ` Marcelo Tosatti [this message]
2010-12-16 17:44 ` [Qemu-devel] [patch 2/3] " Marcelo Tosatti
2011-01-14 10:46 ` Stefan Hajnoczi
2011-01-14 12:20 ` Marcelo Tosatti
2010-12-16 17:44 ` [Qemu-devel] [patch 3/3] do not allow migration if block copy in progress Marcelo Tosatti
-- 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 1/3] add migration_active function 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.650542462@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.