]> git.proxmox.com Git - mirror_qemu.git/commit
ram.c: Reset result after sending queued data
authorLukas Straub <lukasstraub2@web.de>
Thu, 20 Apr 2023 09:48:03 +0000 (11:48 +0200)
committerJuan Quintela <quintela@redhat.com>
Mon, 8 May 2023 13:25:26 +0000 (15:25 +0200)
commitb5cf1cd3e81eebb6343404fe8029d61dfb817d5a
treeabdd15d10d4f1df410cfa54bb9f5b4406ed354dd
parent10c2f7b747bebfbf67b2219330269dcd5721f3d9
ram.c: Reset result after sending queued data

And take the param->mutex lock for the whole section to ensure
thread-safety.
Now, it is explicitly clear if there is no queued data to send.
Before, this was handled by param->file stream being empty and thus
qemu_put_qemu_file() not sending anything.

This will be used in the next commits to move save_page_header()
out of compress code.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/ram.c