]> git.proxmox.com Git - mirror_qemu.git/blobdiff - migration/colo-failover.c
multifd: The variable is only used inside the loop
[mirror_qemu.git] / migration / colo-failover.c
index 891785cb6315ee8b7585562211ba0cec6ef15798..42453481c41aec7d2b27a2ed699035cb007af253 100644 (file)
@@ -15,8 +15,8 @@
 #include "migration/failover.h"
 #include "qemu/main-loop.h"
 #include "migration.h"
-#include "qmp-commands.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-migration.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
 #include "trace.h"
@@ -39,14 +39,14 @@ static void colo_failover_bh(void *opaque)
         return;
     }
 
-    colo_do_failover(NULL);
+    colo_do_failover();
 }
 
 void failover_request_active(Error **errp)
 {
    if (failover_set_state(FAILOVER_STATUS_NONE,
         FAILOVER_STATUS_REQUIRE) != FAILOVER_STATUS_NONE) {
-        error_setg(errp, "COLO failover is already actived");
+        error_setg(errp, "COLO failover is already activated");
         return;
     }
     failover_bh = qemu_bh_new(colo_failover_bh, NULL);
@@ -63,7 +63,7 @@ FailoverStatus failover_set_state(FailoverStatus old_state,
 {
     FailoverStatus old;
 
-    old = atomic_cmpxchg(&failover_state, old_state, new_state);
+    old = qatomic_cmpxchg(&failover_state, old_state, new_state);
     if (old == old_state) {
         trace_colo_failover_set_state(FailoverStatus_str(new_state));
     }
@@ -72,12 +72,12 @@ FailoverStatus failover_set_state(FailoverStatus old_state,
 
 FailoverStatus failover_get_state(void)
 {
-    return atomic_read(&failover_state);
+    return qatomic_read(&failover_state);
 }
 
 void qmp_x_colo_lost_heartbeat(Error **errp)
 {
-    if (get_colo_mode() == COLO_MODE_UNKNOWN) {
+    if (get_colo_mode() == COLO_MODE_NONE) {
         error_setg(errp, QERR_FEATURE_DISABLED, "colo");
         return;
     }