From: Peter Xu Date: Tue, 27 Jan 2026 18:52:42 +0000 (-0500) Subject: migration/colo: Send device states without copying buffer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2602618b3f9396fdccfcebdb9153b7ab95865c50;p=thirdparty%2Fqemu.git migration/colo: Send device states without copying buffer We can safely use the async version of put buffer here because the qemufile will be flushed right away. Suggested-by: Fabiano Rosas Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas Tested-by: Lukas Straub Link: https://lore.kernel.org/qemu-devel/20260127185254.3954634-13-peterx@redhat.com Signed-off-by: Fabiano Rosas --- diff --git a/migration/colo.c b/migration/colo.c index 1b94e0f0ee..0b1a58cd8f 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -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;