]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
migration/colo: Send device states without copying buffer
authorPeter Xu <peterx@redhat.com>
Tue, 27 Jan 2026 18:52:42 +0000 (13:52 -0500)
committerFabiano Rosas <farosas@suse.de>
Tue, 17 Feb 2026 12:53:41 +0000 (09:53 -0300)
We can safely use the async version of put buffer here because the qemufile
will be flushed right away.

Suggested-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Link: https://lore.kernel.org/qemu-devel/20260127185254.3954634-13-peterx@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/colo.c

index 1b94e0f0ee9fe192f224bacd071d99b75f374344..0b1a58cd8f4143c1f85e49e4fe01325de0cf983e 100644 (file)
@@ -486,7 +486,8 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
         goto out;
     }
 
-    qemu_put_buffer(s->to_dst_file, bioc->data, bioc->usage);
+    /* We can use async put because flush happens right away */
+    qemu_put_buffer_async(s->to_dst_file, bioc->data, bioc->usage, false);
     ret = qemu_fflush(s->to_dst_file);
     if (ret < 0) {
         goto out;