[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/6] migration: reorder code to make it symmetric
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PULL 1/6] migration: reorder code to make it symmetric |
Date: |
Fri, 26 Feb 2016 20:47:30 +0530 |
From: Wei Yang <address@hidden>
In qemu_savevm_state_complete_precopy(), it iterates on each device to add
a json object and transfer related status to destination, while the order
of the last two steps could be refined.
Current order:
json_start_object()
save_section_header()
vmstate_save()
json_end_object()
save_section_footer()
After the change:
json_start_object()
save_section_header()
vmstate_save()
save_section_footer()
json_end_object()
This patch reorder the code to to make it symmetric. No functional change.
Signed-off-by: Wei Yang <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>
---
migration/savevm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 94f2894..02e8487 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1088,12 +1088,11 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f,
bool iterable_only)
json_prop_int(vmdesc, "instance_id", se->instance_id);
save_section_header(f, se, QEMU_VM_SECTION_FULL);
-
vmstate_save(f, se, vmdesc);
-
- json_end_object(vmdesc);
trace_savevm_section_end(se->idstr, se->section_id, 0);
save_section_footer(f, se);
+
+ json_end_object(vmdesc);
}
if (!in_postcopy) {
--
2.5.0
- [Qemu-devel] [PULL v3 0/6] migration pull, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 3/6] MAINTAINERS: Add docs/migration.txt to the "Migration" section, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 1/6] migration: reorder code to make it symmetric,
Amit Shah <=
- [Qemu-devel] [PULL 5/6] migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 6/6] migration (postcopy): move bdrv_invalidate_cache_all of of coroutine context, Amit Shah, 2016/02/26
- [Qemu-devel] [PULL 4/6] migration/vmstate: document VMStateFlags, Amit Shah, 2016/02/26
- Re: [Qemu-devel] [PULL v3 0/6] migration pull, Peter Maydell, 2016/02/26