* [Qemu-devel] [PATCH] replication: Make --disable-replication compile
@ 2018-11-14 7:16 Peter Xu
2018-11-14 10:37 ` Dr. David Alan Gilbert
2018-11-14 15:23 ` Alex Bennée
0 siblings, 2 replies; 4+ messages in thread
From: Peter Xu @ 2018-11-14 7:16 UTC (permalink / raw
To: qemu-devel
Cc: peterx, zhanghailiang, Juan Quintela, Dr. David Alan Gilbert,
Peter Maydell, Yanan Fu, Markus Armbruster
We've fixed it before like 38bb54f323 ("replication: Make
--disable-replication compile again", 2017-04-28) but it's failing
again. So fix it again.
There could be even cleaner way to fix this but current way is the
simplest. Let's start from simple.
CC: zhanghailiang <zhang.zhanghailiang@huawei.com>
CC: Juan Quintela <quintela@redhat.com>
CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: Yanan Fu <yfu@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
Reported-by: Yanan Fu <yfu@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/colo.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/migration/colo.c b/migration/colo.c
index 956ac236b7..78b64ef0cb 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -33,8 +33,10 @@
#include "sysemu/cpus.h"
#include "net/filter.h"
+#ifdef CONFIG_REPLICATION
static bool vmstate_loading;
static Notifier packets_compare_notifier;
+#endif
#define COLO_BUFFER_BASE_SIZE (4 * 1024 * 1024)
@@ -59,6 +61,7 @@ static bool colo_runstate_is_stopped(void)
static void secondary_vm_do_failover(void)
{
+#ifdef CONFIG_REPLICATION
int old_state;
MigrationIncomingState *mis = migration_incoming_get_current();
Error *local_err = NULL;
@@ -121,10 +124,14 @@ static void secondary_vm_do_failover(void)
if (mis->migration_incoming_co) {
qemu_coroutine_enter(mis->migration_incoming_co);
}
+#else
+ abort();
+#endif
}
static void primary_vm_do_failover(void)
{
+#ifdef CONFIG_REPLICATION
MigrationState *s = migrate_get_current();
int old_state;
Error *local_err = NULL;
@@ -165,6 +172,9 @@ static void primary_vm_do_failover(void)
/* Notify COLO thread that failover work is finished */
qemu_sem_post(&s->colo_exit_sem);
+#else
+ abort();
+#endif
}
COLOMode get_colo_mode(void)
@@ -271,6 +281,8 @@ COLOStatus *qmp_query_colo_status(Error **errp)
return s;
}
+#ifdef CONFIG_REPLICATION
+
static void colo_send_message(QEMUFile *f, COLOMessage msg,
Error **errp)
{
@@ -489,9 +501,11 @@ static void colo_compare_notify_checkpoint(Notifier *notifier, void *data)
{
colo_checkpoint_notify(data);
}
+#endif
static void colo_process_checkpoint(MigrationState *s)
{
+#ifdef CONFIG_REPLICATION
QIOChannelBuffer *bioc;
QEMUFile *fb = NULL;
int64_t current_time = qemu_clock_get_ms(QEMU_CLOCK_HOST);
@@ -603,6 +617,9 @@ out:
if (s->rp_state.from_dst_file) {
qemu_fclose(s->rp_state.from_dst_file);
}
+#else
+ abort();
+#endif
}
void colo_checkpoint_notify(void *opaque)
@@ -631,6 +648,7 @@ void migrate_start_colo_process(MigrationState *s)
qemu_mutex_lock_iothread();
}
+#ifdef CONFIG_REPLICATION
static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_request,
Error **errp)
{
@@ -653,9 +671,11 @@ static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_request,
break;
}
}
+#endif
void *colo_process_incoming_thread(void *opaque)
{
+#ifdef CONFIG_REPLICATION
MigrationIncomingState *mis = opaque;
QEMUFile *fb = NULL;
QIOChannelBuffer *bioc = NULL; /* Cache incoming device state */
@@ -859,4 +879,7 @@ out:
rcu_unregister_thread();
return NULL;
+#else
+ abort();
+#endif
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile
2018-11-14 7:16 [Qemu-devel] [PATCH] replication: Make --disable-replication compile Peter Xu
@ 2018-11-14 10:37 ` Dr. David Alan Gilbert
2018-11-14 10:48 ` Peter Xu
2018-11-14 15:23 ` Alex Bennée
1 sibling, 1 reply; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2018-11-14 10:37 UTC (permalink / raw
To: Peter Xu
Cc: qemu-devel, zhanghailiang, Juan Quintela, Peter Maydell, Yanan Fu,
Markus Armbruster
* Peter Xu (peterx@redhat.com) wrote:
> We've fixed it before like 38bb54f323 ("replication: Make
> --disable-replication compile again", 2017-04-28) but it's failing
> again. So fix it again.
>
> There could be even cleaner way to fix this but current way is the
> simplest. Let's start from simple.
This is I think the same as the patch posted 1st November:
Fix compilation issue when disable replication
Dave
> CC: zhanghailiang <zhang.zhanghailiang@huawei.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: Yanan Fu <yfu@redhat.com>
> CC: Markus Armbruster <armbru@redhat.com>
> Reported-by: Yanan Fu <yfu@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> migration/colo.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/migration/colo.c b/migration/colo.c
> index 956ac236b7..78b64ef0cb 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -33,8 +33,10 @@
> #include "sysemu/cpus.h"
> #include "net/filter.h"
>
> +#ifdef CONFIG_REPLICATION
> static bool vmstate_loading;
> static Notifier packets_compare_notifier;
> +#endif
>
> #define COLO_BUFFER_BASE_SIZE (4 * 1024 * 1024)
>
> @@ -59,6 +61,7 @@ static bool colo_runstate_is_stopped(void)
>
> static void secondary_vm_do_failover(void)
> {
> +#ifdef CONFIG_REPLICATION
> int old_state;
> MigrationIncomingState *mis = migration_incoming_get_current();
> Error *local_err = NULL;
> @@ -121,10 +124,14 @@ static void secondary_vm_do_failover(void)
> if (mis->migration_incoming_co) {
> qemu_coroutine_enter(mis->migration_incoming_co);
> }
> +#else
> + abort();
> +#endif
> }
>
> static void primary_vm_do_failover(void)
> {
> +#ifdef CONFIG_REPLICATION
> MigrationState *s = migrate_get_current();
> int old_state;
> Error *local_err = NULL;
> @@ -165,6 +172,9 @@ static void primary_vm_do_failover(void)
>
> /* Notify COLO thread that failover work is finished */
> qemu_sem_post(&s->colo_exit_sem);
> +#else
> + abort();
> +#endif
> }
>
> COLOMode get_colo_mode(void)
> @@ -271,6 +281,8 @@ COLOStatus *qmp_query_colo_status(Error **errp)
> return s;
> }
>
> +#ifdef CONFIG_REPLICATION
> +
> static void colo_send_message(QEMUFile *f, COLOMessage msg,
> Error **errp)
> {
> @@ -489,9 +501,11 @@ static void colo_compare_notify_checkpoint(Notifier *notifier, void *data)
> {
> colo_checkpoint_notify(data);
> }
> +#endif
>
> static void colo_process_checkpoint(MigrationState *s)
> {
> +#ifdef CONFIG_REPLICATION
> QIOChannelBuffer *bioc;
> QEMUFile *fb = NULL;
> int64_t current_time = qemu_clock_get_ms(QEMU_CLOCK_HOST);
> @@ -603,6 +617,9 @@ out:
> if (s->rp_state.from_dst_file) {
> qemu_fclose(s->rp_state.from_dst_file);
> }
> +#else
> + abort();
> +#endif
> }
>
> void colo_checkpoint_notify(void *opaque)
> @@ -631,6 +648,7 @@ void migrate_start_colo_process(MigrationState *s)
> qemu_mutex_lock_iothread();
> }
>
> +#ifdef CONFIG_REPLICATION
> static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_request,
> Error **errp)
> {
> @@ -653,9 +671,11 @@ static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_request,
> break;
> }
> }
> +#endif
>
> void *colo_process_incoming_thread(void *opaque)
> {
> +#ifdef CONFIG_REPLICATION
> MigrationIncomingState *mis = opaque;
> QEMUFile *fb = NULL;
> QIOChannelBuffer *bioc = NULL; /* Cache incoming device state */
> @@ -859,4 +879,7 @@ out:
>
> rcu_unregister_thread();
> return NULL;
> +#else
> + abort();
> +#endif
> }
> --
> 2.17.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile
2018-11-14 10:37 ` Dr. David Alan Gilbert
@ 2018-11-14 10:48 ` Peter Xu
0 siblings, 0 replies; 4+ messages in thread
From: Peter Xu @ 2018-11-14 10:48 UTC (permalink / raw
To: Dr. David Alan Gilbert
Cc: qemu-devel, zhanghailiang, Juan Quintela, Peter Maydell, Yanan Fu,
Markus Armbruster
On Wed, Nov 14, 2018 at 10:37:23AM +0000, Dr. David Alan Gilbert wrote:
> * Peter Xu (peterx@redhat.com) wrote:
> > We've fixed it before like 38bb54f323 ("replication: Make
> > --disable-replication compile again", 2017-04-28) but it's failing
> > again. So fix it again.
> >
> > There could be even cleaner way to fix this but current way is the
> > simplest. Let's start from simple.
>
> This is I think the same as the patch posted 1st November:
> Fix compilation issue when disable replication
Yep, thanks for pointing out. Please ignore this patch.
Regards,
--
Peter Xu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] replication: Make --disable-replication compile
2018-11-14 7:16 [Qemu-devel] [PATCH] replication: Make --disable-replication compile Peter Xu
2018-11-14 10:37 ` Dr. David Alan Gilbert
@ 2018-11-14 15:23 ` Alex Bennée
1 sibling, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2018-11-14 15:23 UTC (permalink / raw
To: qemu-devel
Cc: Peter Maydell, zhanghailiang, Yanan Fu, Juan Quintela,
Dr. David Alan Gilbert, peterx, Markus Armbruster
Peter Xu <peterx@redhat.com> writes:
> We've fixed it before like 38bb54f323 ("replication: Make
> --disable-replication compile again", 2017-04-28) but it's failing
> again. So fix it again.
If replication builds by default and you want to defend it not building
then it would probably be worth adding it to the disabled configs in
.travis.yml:
- CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-uuid --disable-libusb --disable-user"
>
> There could be even cleaner way to fix this but current way is the
> simplest. Let's start from simple.
>
> CC: zhanghailiang <zhang.zhanghailiang@huawei.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: Yanan Fu <yfu@redhat.com>
> CC: Markus Armbruster <armbru@redhat.com>
> Reported-by: Yanan Fu <yfu@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> migration/colo.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/migration/colo.c b/migration/colo.c
> index 956ac236b7..78b64ef0cb 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -33,8 +33,10 @@
> #include "sysemu/cpus.h"
> #include "net/filter.h"
>
> +#ifdef CONFIG_REPLICATION
> static bool vmstate_loading;
> static Notifier packets_compare_notifier;
> +#endif
>
> #define COLO_BUFFER_BASE_SIZE (4 * 1024 * 1024)
>
> @@ -59,6 +61,7 @@ static bool colo_runstate_is_stopped(void)
>
> static void secondary_vm_do_failover(void)
> {
> +#ifdef CONFIG_REPLICATION
> int old_state;
> MigrationIncomingState *mis = migration_incoming_get_current();
> Error *local_err = NULL;
> @@ -121,10 +124,14 @@ static void secondary_vm_do_failover(void)
> if (mis->migration_incoming_co) {
> qemu_coroutine_enter(mis->migration_incoming_co);
> }
> +#else
> + abort();
> +#endif
> }
>
> static void primary_vm_do_failover(void)
> {
> +#ifdef CONFIG_REPLICATION
> MigrationState *s = migrate_get_current();
> int old_state;
> Error *local_err = NULL;
> @@ -165,6 +172,9 @@ static void primary_vm_do_failover(void)
>
> /* Notify COLO thread that failover work is finished */
> qemu_sem_post(&s->colo_exit_sem);
> +#else
> + abort();
> +#endif
> }
>
> COLOMode get_colo_mode(void)
> @@ -271,6 +281,8 @@ COLOStatus *qmp_query_colo_status(Error **errp)
> return s;
> }
>
> +#ifdef CONFIG_REPLICATION
> +
> static void colo_send_message(QEMUFile *f, COLOMessage msg,
> Error **errp)
> {
> @@ -489,9 +501,11 @@ static void colo_compare_notify_checkpoint(Notifier *notifier, void *data)
> {
> colo_checkpoint_notify(data);
> }
> +#endif
>
> static void colo_process_checkpoint(MigrationState *s)
> {
> +#ifdef CONFIG_REPLICATION
> QIOChannelBuffer *bioc;
> QEMUFile *fb = NULL;
> int64_t current_time = qemu_clock_get_ms(QEMU_CLOCK_HOST);
> @@ -603,6 +617,9 @@ out:
> if (s->rp_state.from_dst_file) {
> qemu_fclose(s->rp_state.from_dst_file);
> }
> +#else
> + abort();
> +#endif
> }
>
> void colo_checkpoint_notify(void *opaque)
> @@ -631,6 +648,7 @@ void migrate_start_colo_process(MigrationState *s)
> qemu_mutex_lock_iothread();
> }
>
> +#ifdef CONFIG_REPLICATION
> static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_request,
> Error **errp)
> {
> @@ -653,9 +671,11 @@ static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_request,
> break;
> }
> }
> +#endif
>
> void *colo_process_incoming_thread(void *opaque)
> {
> +#ifdef CONFIG_REPLICATION
> MigrationIncomingState *mis = opaque;
> QEMUFile *fb = NULL;
> QIOChannelBuffer *bioc = NULL; /* Cache incoming device state */
> @@ -859,4 +879,7 @@ out:
>
> rcu_unregister_thread();
> return NULL;
> +#else
> + abort();
> +#endif
> }
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-14 15:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 7:16 [Qemu-devel] [PATCH] replication: Make --disable-replication compile Peter Xu
2018-11-14 10:37 ` Dr. David Alan Gilbert
2018-11-14 10:48 ` Peter Xu
2018-11-14 15:23 ` Alex Bennée
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.