From: Amit Shah <amit.shah@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Juan Quintela <quintela@redhat.com>,
qemu list <qemu-devel@nongnu.org>,
Matthew.Fortune@imgtec.com, Amit Shah <amit.shah@redhat.com>,
den@openvz.org, richard.weiyang@gmail.com,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
silbe@linux.vnet.ibm.com
Subject: [Qemu-devel] [PULL 1/6] migration: reorder code to make it symmetric
Date: Fri, 26 Feb 2016 15:25:40 +0530 [thread overview]
Message-ID: <bdf46d6478df86d5810048459582dc8f5a15b064.1456480352.git.amit.shah@redhat.com> (raw)
In-Reply-To: <cover.1456480352.git.amit.shah@redhat.com>
In-Reply-To: <cover.1456480352.git.amit.shah@redhat.com>
From: Wei Yang <richard.weiyang@gmail.com>
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>
Message-Id: <1454626230-16334-1-git-send-email-richard.weiyang@gmail.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
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
next prev parent reply other threads:[~2016-02-26 9:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 9:55 [Qemu-devel] [PULL 0/6] migration pull Amit Shah
2016-02-26 9:55 ` Amit Shah [this message]
2016-02-26 9:55 ` [Qemu-devel] [PULL 2/6] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD Amit Shah
2016-02-26 9:55 ` [Qemu-devel] [PULL 3/6] migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context Amit Shah
2016-02-26 9:55 ` [Qemu-devel] [PULL 4/6] migration (postcopy): " Amit Shah
2016-02-26 9:55 ` [Qemu-devel] [PULL 5/6] MAINTAINERS: Add docs/migration.txt to the "Migration" section Amit Shah
2016-02-26 9:55 ` [Qemu-devel] [PULL 6/6] migration/vmstate: document VMStateFlags Amit Shah
2016-02-26 12:23 ` [Qemu-devel] [PULL 0/6] migration pull Peter Maydell
2016-02-26 13:15 ` Amit Shah
2016-02-26 14:58 ` Denis V. Lunev
2016-02-26 15:14 ` Amit Shah
2016-02-26 15:28 ` Denis V. Lunev
-- strict thread matches above, loose matches on Subject: below --
2016-02-26 15:17 [Qemu-devel] [PULL v3 " Amit Shah
2016-02-26 15:17 ` [Qemu-devel] [PULL 1/6] migration: reorder code to make it symmetric Amit Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdf46d6478df86d5810048459582dc8f5a15b064.1456480352.git.amit.shah@redhat.com \
--to=amit.shah@redhat.com \
--cc=Matthew.Fortune@imgtec.com \
--cc=den@openvz.org \
--cc=dgilbert@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.weiyang@gmail.com \
--cc=silbe@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).