[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V9 18/20] COLO: notify net filters about checkpoint/
From: |
Zhang Chen |
Subject: |
[Qemu-devel] [PATCH V9 18/20] COLO: notify net filters about checkpoint/failover event |
Date: |
Thu, 28 Jun 2018 04:41:34 +0800 |
From: zhanghailiang <address@hidden>
Notify all net filters about the checkpoint and failover event.
Signed-off-by: zhanghailiang <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
---
migration/colo.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/migration/colo.c b/migration/colo.c
index a32c8e2244..4d0ee7d8aa 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -31,6 +31,7 @@
#include "qapi/qapi-events-migration.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/cpus.h"
+#include "net/filter.h"
static bool vmstate_loading;
static Notifier packets_compare_notifier;
@@ -83,6 +84,12 @@ static void secondary_vm_do_failover(void)
error_report_err(local_err);
}
+ /* Notify all filters of all NIC to do checkpoint */
+ colo_notify_filters_event(COLO_EVENT_FAILOVER, &local_err);
+ if (local_err) {
+ error_report_err(local_err);
+ }
+
if (!autostart) {
error_report("\"-S\" qemu option will be ignored in secondary side");
/* recover runstate to normal migration finish state */
@@ -799,6 +806,14 @@ void *colo_process_incoming_thread(void *opaque)
goto out;
}
+ /* Notify all filters of all NIC to do checkpoint */
+ colo_notify_filters_event(COLO_EVENT_CHECKPOINT, &local_err);
+
+ if (local_err) {
+ qemu_mutex_unlock_iothread();
+ goto out;
+ }
+
vmstate_loading = false;
vm_start();
trace_colo_vm_state_change("stop", "run");
--
2.17.GIT
- [Qemu-devel] [PATCH V9 09/20] COLO: Flush memory data from ram cache, (continued)
- [Qemu-devel] [PATCH V9 09/20] COLO: Flush memory data from ram cache, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 10/20] qmp event: Add COLO_EXIT event to notify users while exited COLO, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 11/20] qapi/migration.json: Rename COLO unknown mode to none mode., Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 12/20] qapi: Add new command to query colo status, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 14/20] COLO: flush host dirty ram from cache, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 13/20] savevm: split the process of different stages for loadvm/savevm, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 15/20] net/net.c: Add net client type check function for COLO, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 16/20] filter: Add handle_event method for NetFilterClass, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 17/20] filter-rewriter: handle checkpoint and failover event, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 18/20] COLO: notify net filters about checkpoint/failover event,
Zhang Chen <=
- [Qemu-devel] [PATCH V9 19/20] COLO: quick failover process by kick COLO thread, Zhang Chen, 2018/06/27
- [Qemu-devel] [PATCH V9 20/20] docs: Add COLO status diagram to COLO-FT.txt, Zhang Chen, 2018/06/27