[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/79] replication: Make --disable-replication compi
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 12/79] replication: Make --disable-replication compile again |
Date: |
Mon, 28 Aug 2017 19:13:47 -0500 |
From: Markus Armbruster <address@hidden>
Broken in commit daa33c5.
Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Zhang Chen <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit 38bb54f323bf7c83496b6a044cfd28896e997a00)
Signed-off-by: Michael Roth <address@hidden>
---
migration/colo.c | 12 ++++++++++++
monitor.c | 5 +++++
2 files changed, 17 insertions(+)
diff --git a/migration/colo.c b/migration/colo.c
index c19eb3f..963c802 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -153,6 +153,7 @@ void qmp_xen_set_replication(bool enable, bool primary,
bool has_failover, bool failover,
Error **errp)
{
+#ifdef CONFIG_REPLICATION
ReplicationMode mode = primary ?
REPLICATION_MODE_PRIMARY :
REPLICATION_MODE_SECONDARY;
@@ -171,10 +172,14 @@ void qmp_xen_set_replication(bool enable, bool primary,
}
replication_stop_all(failover, failover ? NULL : errp);
}
+#else
+ abort();
+#endif
}
ReplicationStatus *qmp_query_xen_replication_status(Error **errp)
{
+#ifdef CONFIG_REPLICATION
Error *err = NULL;
ReplicationStatus *s = g_new0(ReplicationStatus, 1);
@@ -189,11 +194,18 @@ ReplicationStatus *qmp_query_xen_replication_status(Error
**errp)
error_free(err);
return s;
+#else
+ abort();
+#endif
}
void qmp_xen_colo_do_checkpoint(Error **errp)
{
+#ifdef CONFIG_REPLICATION
replication_do_checkpoint_all(errp);
+#else
+ abort();
+#endif
}
static void colo_send_message(QEMUFile *f, COLOMessage msg,
diff --git a/monitor.c b/monitor.c
index be282ec..2799a37 100644
--- a/monitor.c
+++ b/monitor.c
@@ -974,6 +974,11 @@ static void qmp_unregister_commands_hack(void)
#ifndef CONFIG_SPICE
qmp_unregister_command(&qmp_commands, "query-spice");
#endif
+#ifndef CONFIG_REPLICATION
+ qmp_unregister_command(&qmp_commands, "xen-set-replication");
+ qmp_unregister_command(&qmp_commands, "query-xen-replication-status");
+ qmp_unregister_command(&qmp_commands, "xen-colo-do-checkpoint");
+#endif
#ifndef TARGET_I386
qmp_unregister_command(&qmp_commands, "rtc-reset-reinjection");
#endif
--
2.7.4
- [Qemu-devel] [PATCH 00/79] Patch Round-up for stable 2.9.1, freeze on 2017-09-04, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 10/79] block: Do not unref bs->file on error in BD's open, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 14/79] coccinelle: Add script to remove useless QObject casts, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 09/79] pci: deassert intx when pci device unrealize, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 13/79] 9pfs: local: fix unlink of alien files in mapped-file mode, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 11/79] ACPI: don't call acpi_pcihp_device_plug_cb on xen, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 16/79] qobject: Add helper macros for common scalar insertions, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 12/79] replication: Make --disable-replication compile again,
Michael Roth <=
- [Qemu-devel] [PATCH 17/79] s390x: Drop useless casts, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 21/79] aio: add missing aio_notify() to aio_enable_external(), Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 15/79] qobject: Drop useless QObject casts, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 01/79] qga-win: Enable 'can-offline' field in 'guest-get-vcpus' reply, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 19/79] block: Reuse bs as backing hd for drive-backup sync=none, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 20/79] hw/virtio: fix vhost user fails to startup when MQ, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 22/79] qemu-img: wait for convert coroutines to complete, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 23/79] block/vhdx: Make vhdx_create() always set errp, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 27/79] target/xtensa: fix return value of read/write simcalls, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 26/79] target/xtensa: fix mapping direction in read/write simcalls, Michael Roth, 2017/08/28