qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] replication: Make --disable-replication compile again
@ 2017-04-27 13:00 Markus Armbruster
  2017-04-27 13:27 ` Eric Blake
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Markus Armbruster @ 2017-04-27 13:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: zhangchen.fnst, wencongyang, zhang.zhanghailiang, qemu-stable

Broken in commit daa33c5.

Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 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 6289e52..62c9f81 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile again
  2017-04-27 13:00 [Qemu-devel] [PATCH] replication: Make --disable-replication compile again Markus Armbruster
@ 2017-04-27 13:27 ` Eric Blake
  2017-04-27 13:30 ` Zhang Chen
  2017-04-28 15:59 ` Stefan Hajnoczi
  2 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2017-04-27 13:27 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel
  Cc: wencongyang, zhang.zhanghailiang, zhangchen.fnst, qemu-stable

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

On 04/27/2017 08:00 AM, Markus Armbruster wrote:
> Broken in commit daa33c5.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  migration/colo.c | 12 ++++++++++++
>  monitor.c        |  5 +++++
>  2 files changed, 17 insertions(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile again
  2017-04-27 13:00 [Qemu-devel] [PATCH] replication: Make --disable-replication compile again Markus Armbruster
  2017-04-27 13:27 ` Eric Blake
@ 2017-04-27 13:30 ` Zhang Chen
  2017-04-27 14:07   ` Markus Armbruster
  2017-04-28 15:59 ` Stefan Hajnoczi
  2 siblings, 1 reply; 5+ messages in thread
From: Zhang Chen @ 2017-04-27 13:30 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel
  Cc: zhangchen.fnst, wencongyang, zhang.zhanghailiang, qemu-stable,
	Paolo Bonzini



On 04/27/2017 09:00 PM, Markus Armbruster wrote:
> Broken in commit daa33c5.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

About this bug I remember have discussed with paolo.

https://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg01326.html

And about this patch content.

Reviewed-by:Zhang Chen <zhangchen.fnst@cn.fujitsu.com>


Thanks
Zhang Chen


> ---
>   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 6289e52..62c9f81 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

-- 
Thanks
Zhang Chen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile again
  2017-04-27 13:30 ` Zhang Chen
@ 2017-04-27 14:07   ` Markus Armbruster
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2017-04-27 14:07 UTC (permalink / raw)
  To: Zhang Chen
  Cc: qemu-devel, wencongyang, Paolo Bonzini, zhang.zhanghailiang,
	qemu-stable

Zhang Chen <zhangchen.fnst@cn.fujitsu.com> writes:

> On 04/27/2017 09:00 PM, Markus Armbruster wrote:
>> Broken in commit daa33c5.
>>
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
> About this bug I remember have discussed with paolo.
>
> https://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg01326.html

If I understand that discussion correctly, it's about replacing
--enable-replication (and possibly other stuff) by --enable-colo.
Sounds fair to me, patches welcome.

> And about this patch content.
>
> Reviewed-by:Zhang Chen <zhangchen.fnst@cn.fujitsu.com>

Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile again
  2017-04-27 13:00 [Qemu-devel] [PATCH] replication: Make --disable-replication compile again Markus Armbruster
  2017-04-27 13:27 ` Eric Blake
  2017-04-27 13:30 ` Zhang Chen
@ 2017-04-28 15:59 ` Stefan Hajnoczi
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2017-04-28 15:59 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, wencongyang, zhang.zhanghailiang, zhangchen.fnst,
	qemu-stable

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

On Thu, Apr 27, 2017 at 03:00:53PM +0200, Markus Armbruster wrote:
> Broken in commit daa33c5.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  migration/colo.c | 12 ++++++++++++
>  monitor.c        |  5 +++++
>  2 files changed, 17 insertions(+)

Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-28 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27 13:00 [Qemu-devel] [PATCH] replication: Make --disable-replication compile again Markus Armbruster
2017-04-27 13:27 ` Eric Blake
2017-04-27 13:30 ` Zhang Chen
2017-04-27 14:07   ` Markus Armbruster
2017-04-28 15:59 ` Stefan Hajnoczi

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).