[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 38/42] migration: Cleanup qemu_savevm_state_complete_precopy()
From: |
Fabiano Rosas |
Subject: |
[PULL 38/42] migration: Cleanup qemu_savevm_state_complete_precopy() |
Date: |
Wed, 29 Jan 2025 13:00:55 -0300 |
From: Peter Xu <peterx@redhat.com>
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>
Tested-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Juraj Marcin <jmarcin@redhat.com>
Link: 20250114230746.3268797-14-peterx@redhat.com">https://lore.kernel.org/r/20250114230746.3268797-14-peterx@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
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.35.3
- [PULL 16/42] migration: cpr-transfer save and load, (continued)
- [PULL 16/42] migration: cpr-transfer save and load, Fabiano Rosas, 2025/01/29
- [PULL 27/42] migration: Do not construct JSON description if suppressed, Fabiano Rosas, 2025/01/29
- [PULL 32/42] migration: Adjust postcopy bandwidth during switchover, Fabiano Rosas, 2025/01/29
- [PULL 31/42] migration: Synchronize all CPU states only for non-iterable dump, Fabiano Rosas, 2025/01/29
- [PULL 36/42] migration: Notify COMPLETE once for postcopy, Fabiano Rosas, 2025/01/29
- [PULL 41/42] migration: Trivial cleanup on JSON writer of vmstate_save(), Fabiano Rosas, 2025/01/29
- [PULL 42/42] migration: refactor ram_save_target_page functions, Fabiano Rosas, 2025/01/29
- [PULL 17/42] migration: cpr-transfer mode, Fabiano Rosas, 2025/01/29
- [PULL 35/42] migration: Take BQL slightly longer in postcopy_start(), Fabiano Rosas, 2025/01/29
- [PULL 37/42] migration: Unwrap qemu_savevm_state_complete_precopy() in postcopy, Fabiano Rosas, 2025/01/29
- [PULL 38/42] migration: Cleanup qemu_savevm_state_complete_precopy(),
Fabiano Rosas <=
- [PULL 39/42] migration: Always set DEVICE state, Fabiano Rosas, 2025/01/29
- [PULL 40/42] migration: Merge precopy/postcopy on switchover start, Fabiano Rosas, 2025/01/29