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>
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;