]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Some minor optimizations for COLO
authorRao, Lei <lei.rao@intel.com>
Mon, 1 Nov 2021 07:56:59 +0000 (15:56 +0800)
committerJuan Quintela <quintela@trasno.org>
Wed, 3 Nov 2021 08:38:53 +0000 (09:38 +0100)
Signed-off-by: Lei Rao <lei.rao@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/colo.c
net/colo-compare.c

index 79fa1f66194beaae528c1605a1dca93ecd7e7c7d..616dc00af7145873fe32e9f4df9d16b50109c4e5 100644 (file)
@@ -152,7 +152,7 @@ static void primary_vm_do_failover(void)
      * kick COLO thread which might wait at
      * qemu_sem_wait(&s->colo_checkpoint_sem).
      */
-    colo_checkpoint_notify(migrate_get_current());
+    colo_checkpoint_notify(s);
 
     /*
      * Wake up COLO thread which may blocked in recv() or send(),
index b100e7b51f531281ca9a3a3a3b168a8c793a930c..4a64a5d3869249f08dda24c8774bbf800bd615d7 100644 (file)
@@ -170,7 +170,7 @@ static bool packet_matches_str(const char *str,
         return false;
     }
 
-    return !memcmp(str, buf, strlen(str));
+    return !memcmp(str, buf, packet_len);
 }
 
 static void notify_remote_frame(CompareState *s)