From: Jules Wang <junqing.wang@cs2c.com.cn>
To: qemu-devel@nongnu.org
Cc: quintela@redhat.com, owasserm@redhat.com,
Jules Wang <junqing.wang@cs2c.com.cn>,
stefanha@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface
Date: Tue, 10 Sep 2013 11:43:25 +0800 [thread overview]
Message-ID: <1378784607-7398-3-git-send-email-junqing.wang@cs2c.com.cn> (raw)
In-Reply-To: <1378784607-7398-1-git-send-email-junqing.wang@cs2c.com.cn>
Parse the word 'curling' when incoming/outgoing migration is
starting. So we know whether to enable fault tolerant or not.
Signed-off-by: Jules Wang <junqing.wang@cs2c.com.cn>
---
include/migration/migration.h | 2 ++
migration.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 140e6b4..4cbb62f 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -162,4 +162,6 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset,
ram_addr_t offset, size_t size,
int *bytes_sent);
+bool ft_enabled(void);
+
#endif
diff --git a/migration.c b/migration.c
index 200d404..59c8f32 100644
--- a/migration.c
+++ b/migration.c
@@ -58,6 +58,12 @@ enum {
static NotifierList migration_state_notifiers =
NOTIFIER_LIST_INITIALIZER(migration_state_notifiers);
+static bool ft_mode;
+bool ft_enabled(void)
+{
+ return ft_mode;
+}
+
/* When we add fault tolerance, we could have several
migrations at once. For now we don't need to add
dynamic creation of migration */
@@ -78,6 +84,11 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
{
const char *p;
+ if (strstart(uri, "curling:", &p)) {
+ ft_mode = true;
+ uri = p;
+ }
+
if (strstart(uri, "tcp:", &p))
tcp_start_incoming_migration(p, errp);
#ifdef CONFIG_RDMA
@@ -420,6 +431,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
s = migrate_init(¶ms);
+ if (strstart(uri, "curling:", &p)) {
+ ft_mode = true;
+ uri = p;
+ }
+
if (strstart(uri, "tcp:", &p)) {
tcp_start_outgoing_migration(s, p, &local_err);
#ifdef CONFIG_RDMA
--
1.8.0.1
next prev parent reply other threads:[~2013-09-10 4:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 3:43 [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance Jules Wang
2013-09-10 3:43 ` [Qemu-devel] [PATCH RFC 1/4] Curling: add doc Jules Wang
2013-09-10 3:43 ` Jules Wang [this message]
2013-09-10 13:57 ` [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface Juan Quintela
2013-09-10 13:03 ` Paolo Bonzini
2013-09-10 16:37 ` Juan Quintela
2013-09-10 14:38 ` Paolo Bonzini
2013-09-10 15:21 ` Juan Quintela
2013-09-10 15:22 ` Juan Quintela
2013-09-11 2:51 ` junqing.wang
2013-09-10 3:43 ` [Qemu-devel] [PATCH RFC 3/4] Curling: the sender Jules Wang
2013-09-10 14:05 ` Juan Quintela
2013-09-11 7:31 ` junqing.wang
2013-09-10 3:43 ` [Qemu-devel] [PATCH RFC 4/4] Curling: the receiver Jules Wang
2013-09-10 14:19 ` Juan Quintela
2013-09-11 8:25 ` junqing.wang
2013-09-10 12:27 ` [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance Orit Wasserman
2013-09-11 1:54 ` junqing.wang
2013-09-12 7:37 ` Orit Wasserman
2013-09-12 8:17 ` junqing.wang
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=1378784607-7398-3-git-send-email-junqing.wang@cs2c.com.cn \
--to=junqing.wang@cs2c.com.cn \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).