diff options
| author | Peter Xu <peterx@redhat.com> | 2025-01-14 18:07:42 -0500 |
|---|---|---|
| committer | Fabiano Rosas <farosas@suse.de> | 2025-01-29 11:56:41 -0300 |
| commit | 15c2ffa0b739fb40e448892ff0d0d49f99263530 (patch) | |
| tree | 11a377eb3448a5ea66b51d50b042ad354cdb2c2c /migration/savevm.h | |
| parent | 46b0155ecf3e65ba1497a9eb35e7352c36ed6f31 (diff) | |
| download | focaccia-qemu-15c2ffa0b739fb40e448892ff0d0d49f99263530.tar.gz focaccia-qemu-15c2ffa0b739fb40e448892ff0d0d49f99263530.zip | |
migration: Unwrap qemu_savevm_state_complete_precopy() in postcopy
Postcopy invokes qemu_savevm_state_complete_precopy() twice for a long time, and that caused way too much confusions. Let's clean this up and make postcopy easier to read. It's actually fairly straightforward: postcopy starts with saving non-postcopiable iterables, then later it saves again with non-iterable only. Move these two calls out makes everything much easier to follow. Otherwise it's very unclear what qemu_savevm_state_complete_precopy() did in either of the calls. No functional change intended. Signed-off-by: Peter Xu <peterx@redhat.com> Tested-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Juraj Marcin <jmarcin@redhat.com> Link: https://lore.kernel.org/r/20250114230746.3268797-13-peterx@redhat.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'migration/savevm.h')
| -rw-r--r-- | migration/savevm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/savevm.h b/migration/savevm.h index c48a53e95e..7957460062 100644 --- a/migration/savevm.h +++ b/migration/savevm.h @@ -44,6 +44,7 @@ void qemu_savevm_state_pending_exact(uint64_t *must_precopy, uint64_t *can_postcopy); void qemu_savevm_state_pending_estimate(uint64_t *must_precopy, uint64_t *can_postcopy); +int qemu_savevm_state_complete_precopy_iterable(QEMUFile *f, bool in_postcopy); void qemu_savevm_send_ping(QEMUFile *f, uint32_t value); void qemu_savevm_send_open_return_path(QEMUFile *f); int qemu_savevm_send_packaged(QEMUFile *f, const uint8_t *buf, size_t len); |