qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: zhangchen.fnst@cn.fujitsu.com, wencongyang@gmail.com,
	zhang.zhanghailiang@huawei.com, qemu-stable@nongnu.org,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile again
Date: Thu, 27 Apr 2017 21:30:53 +0800	[thread overview]
Message-ID: <b7a05120-f94d-a99b-aab2-6208715d47ff@cn.fujitsu.com> (raw)
In-Reply-To: <1493298053-17140-1-git-send-email-armbru@redhat.com>



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

  parent reply	other threads:[~2017-04-27 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-04-27 14:07   ` Markus Armbruster
2017-04-28 15:59 ` Stefan Hajnoczi

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=b7a05120-f94d-a99b-aab2-6208715d47ff@cn.fujitsu.com \
    --to=zhangchen.fnst@cn.fujitsu.com \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=wencongyang@gmail.com \
    --cc=zhang.zhanghailiang@huawei.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).