[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V10 18/20] COLO: notify net filters about checkpoint
From: |
Zhang Chen |
Subject: |
[Qemu-devel] [PATCH V10 18/20] COLO: notify net filters about checkpoint/failover event |
Date: |
Mon, 23 Jul 2018 03:33:48 +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 688d6f40b2..8221a18add 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 */
@@ -781,6 +788,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.1
- [Qemu-devel] [PATCH V10 08/20] ram/COLO: Record the dirty pages that SVM received, (continued)
- [Qemu-devel] [PATCH V10 08/20] ram/COLO: Record the dirty pages that SVM received, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 09/20] COLO: Flush memory data from ram cache, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 10/20] qmp event: Add COLO_EXIT event to notify users while exited COLO, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 11/20] qapi/migration.json: Rename COLO unknown mode to none mode., Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 12/20] qapi: Add new command to query colo status, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 13/20] savevm: split the process of different stages for loadvm/savevm, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 14/20] COLO: flush host dirty ram from cache, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 15/20] net/net.c: Add net client type check function for COLO, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 16/20] filter: Add handle_event method for NetFilterClass, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 17/20] filter-rewriter: handle checkpoint and failover event, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 18/20] COLO: notify net filters about checkpoint/failover event,
Zhang Chen <=
- [Qemu-devel] [PATCH V10 19/20] COLO: quick failover process by kick COLO thread, Zhang Chen, 2018/07/22
- [Qemu-devel] [PATCH V10 20/20] docs: Add COLO status diagram to COLO-FT.txt, Zhang Chen, 2018/07/22