[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/16] migration: Cleanup qemu_savevm_state_complete_precopy()
From: |
Peter Xu |
Subject: |
[PATCH 13/16] migration: Cleanup qemu_savevm_state_complete_precopy() |
Date: |
Tue, 14 Jan 2025 18:07:43 -0500 |
Now qemu_savevm_state_complete_precopy() is never used in postcopy, clean
it up as in_postcopy==false now unconditionally.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/savevm.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 0ddc4c8eb5..bc375db282 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1577,25 +1577,19 @@ int
qemu_savevm_state_complete_precopy_non_iterable(QEMUFile *f,
int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only)
{
int ret;
- bool in_postcopy = migration_in_postcopy();
- if (!in_postcopy || iterable_only) {
- ret = qemu_savevm_state_complete_precopy_iterable(f, in_postcopy);
+ ret = qemu_savevm_state_complete_precopy_iterable(f, false);
+ if (ret) {
+ return ret;
+ }
+
+ if (!iterable_only) {
+ ret = qemu_savevm_state_complete_precopy_non_iterable(f, false);
if (ret) {
return ret;
}
}
- if (iterable_only) {
- goto flush;
- }
-
- ret = qemu_savevm_state_complete_precopy_non_iterable(f, in_postcopy);
- if (ret) {
- return ret;
- }
-
-flush:
return qemu_fflush(f);
}
--
2.47.0
- [PATCH 01/16] migration: Remove postcopy implications in should_send_vmdesc(), (continued)
- [PATCH 01/16] migration: Remove postcopy implications in should_send_vmdesc(), Peter Xu, 2025/01/14
- [PATCH 02/16] migration: Do not construct JSON description if suppressed, Peter Xu, 2025/01/14
- [PATCH 03/16] migration: Optimize postcopy on downtime by avoiding JSON writer, Peter Xu, 2025/01/14
- [PATCH 04/16] migration: Avoid two src-downtime-end tracepoints for postcopy, Peter Xu, 2025/01/14
- [PATCH 05/16] migration: Drop inactivate_disk param in qemu_savevm_state_complete*, Peter Xu, 2025/01/14
- [PATCH 06/16] migration: Synchronize all CPU states only for non-iterable dump, Peter Xu, 2025/01/14
- [PATCH 08/16] migration: Adjust locking in migration_maybe_pause(), Peter Xu, 2025/01/14
- [PATCH 07/16] migration: Adjust postcopy bandwidth during switchover, Peter Xu, 2025/01/14
- [PATCH 10/16] migration: Take BQL slightly longer in postcopy_start(), Peter Xu, 2025/01/14
- [PATCH 12/16] migration: Unwrap qemu_savevm_state_complete_precopy() in postcopy, Peter Xu, 2025/01/14
- [PATCH 13/16] migration: Cleanup qemu_savevm_state_complete_precopy(),
Peter Xu <=
- [PATCH 11/16] migration: Notify COMPLETE once for postcopy, Peter Xu, 2025/01/14
- [PATCH 14/16] migration: Always set DEVICE state, Peter Xu, 2025/01/14
- [PATCH 15/16] migration: Merge precopy/postcopy on switchover start, Peter Xu, 2025/01/14
- [PATCH 16/16] migration: Trivial cleanup on JSON writer of vmstate_save(), Peter Xu, 2025/01/14
- [PATCH 09/16] migration: Drop cached migration state in migration_maybe_pause(), Peter Xu, 2025/01/14
- Re: [PATCH 00/16] migration: Switchover phase refactoring, Jiri Denemark, 2025/01/15
- Re: [PATCH 00/16] migration: Switchover phase refactoring, Juraj Marcin, 2025/01/15
- Re: [PATCH 00/16] migration: Switchover phase refactoring, Fabiano Rosas, 2025/01/15