* [Qemu-devel] [PATCH] migration: reorder code to make it symmetric
@ 2016-02-04 22:50 Wei Yang
2016-02-11 0:56 ` Wei Yang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Wei Yang @ 2016-02-04 22:50 UTC (permalink / raw
To: quintela, amit.shah; +Cc: qemu-trivial, qemu-devel, Wei Yang
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 <richard.weiyang@gmail.com>
---
migration/savevm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index b9caf59..42bfab4 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) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: reorder code to make it symmetric
2016-02-04 22:50 [Qemu-devel] [PATCH] migration: reorder code to make it symmetric Wei Yang
@ 2016-02-11 0:56 ` Wei Yang
2016-02-20 0:34 ` Wei Yang
2016-02-22 3:52 ` Amit Shah
2 siblings, 0 replies; 4+ messages in thread
From: Wei Yang @ 2016-02-11 0:56 UTC (permalink / raw
To: Wei Yang; +Cc: amit.shah, qemu-trivial, qemu-devel, quintela
Hello everyone,
Is this one correct?
On Thu, Feb 04, 2016 at 10:50:30PM +0000, Wei Yang wrote:
>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 <richard.weiyang@gmail.com>
>---
> migration/savevm.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/migration/savevm.c b/migration/savevm.c
>index b9caf59..42bfab4 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) {
>--
>1.7.9.5
--
Wei Yang
Help you, Help me
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: reorder code to make it symmetric
2016-02-04 22:50 [Qemu-devel] [PATCH] migration: reorder code to make it symmetric Wei Yang
2016-02-11 0:56 ` Wei Yang
@ 2016-02-20 0:34 ` Wei Yang
2016-02-22 3:52 ` Amit Shah
2 siblings, 0 replies; 4+ messages in thread
From: Wei Yang @ 2016-02-20 0:34 UTC (permalink / raw
To: Wei Yang; +Cc: amit.shah, qemu-trivial, qemu-devel, quintela
Hi, Amit
Do you like this one?
On Thu, Feb 04, 2016 at 10:50:30PM +0000, Wei Yang wrote:
>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 <richard.weiyang@gmail.com>
>---
> migration/savevm.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/migration/savevm.c b/migration/savevm.c
>index b9caf59..42bfab4 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) {
>--
>1.7.9.5
--
Wei Yang
Help you, Help me
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: reorder code to make it symmetric
2016-02-04 22:50 [Qemu-devel] [PATCH] migration: reorder code to make it symmetric Wei Yang
2016-02-11 0:56 ` Wei Yang
2016-02-20 0:34 ` Wei Yang
@ 2016-02-22 3:52 ` Amit Shah
2 siblings, 0 replies; 4+ messages in thread
From: Amit Shah @ 2016-02-22 3:52 UTC (permalink / raw
To: Wei Yang; +Cc: qemu-trivial, qemu-devel, quintela
On (Thu) 04 Feb 2016 [22:50:30], Wei Yang wrote:
> 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 <richard.weiyang@gmail.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Thanks,
Amit
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-22 3:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 22:50 [Qemu-devel] [PATCH] migration: reorder code to make it symmetric Wei Yang
2016-02-11 0:56 ` Wei Yang
2016-02-20 0:34 ` Wei Yang
2016-02-22 3:52 ` Amit Shah
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.